Viewing 15 posts - 796 through 810 (of 1,082 total)
Hi,
Thanks all for the replies, some very interesting thoughts and ideas 🙂
July 29, 2008 at 3:52 am
Not sure about everyone else.
But tend to find it easier to design a db then write queries on it.
You need to decide what data you want to store and weather...
July 28, 2008 at 9:53 am
HI There,
It's still going to be pretty hard to give advise without knowing the relationship between the 4 tables.
Could you give us an example such as.
CREATE TABLE [TableA]
(....)
CREATE TABLE [TableB]
(....)
CREATE...
July 28, 2008 at 9:20 am
Hi ,
This seemed to work for me:
SELECT
CatA = (CASE WHEN (Cat = 'CatA') AND
(CAST(RAND(CAST(NEWID() AS VARBINARY))*6+1 AS INT) >= RNG) THEN CatA+1 ELSE CatA END),
CatB = (CASE WHEN...
July 28, 2008 at 6:46 am
Hi,
I hope this helps explain:
--OUT SIDE EXAMPLE
DECLARE @sql VARCHAR(4000)
CREATE TABLE #tmp
(Id INT)
INSERT INTO #tmp VALUES(1)
SET @sql = 'INSERT INTO #tmp VALUES(2)'
EXEC (@SQL)
SELECT * FROM #tmp
DROP TABLE #tmp
--INSIDE...
July 28, 2008 at 6:24 am
Hi,
The Table #Temp is not in the correct scope.
If it is created outside the dynmaic sql batch then it will only be accesible outside the dynamic batch.
If you create it...
July 28, 2008 at 6:14 am
HI there,
It will be hard for us to tell why your CTE returned different results to your tempory table, without actually seeing the code for the creation of the two...
July 28, 2008 at 6:12 am
Wow that was driving me crazy.
the variable:
@params is too short so it's causing everthing to fall over.
Extend the length and all should be sorted 🙂
July 25, 2008 at 10:38 am
OK I don't get the same error, but here is what I think.
If any of your variables that help build your string are null then it will all fall over.
I...
July 25, 2008 at 10:14 am
rbarryyoung (7/23/2008)
July 24, 2008 at 10:11 am
Hi Jeff,
I was just thinking about us all returning different columns etc.
I've tested it with the same columns of AccNum, Id, Address and the results are very similiar.
Out of interest...
July 22, 2008 at 9:45 am
HI Chris,
I have run 2k version on 10000 rows and it takes 3000ms where the 2k5 versions run in sub 50ms
I tried to run it on a 1Mil but it...
July 22, 2008 at 9:34 am
ooops
Sorry lazy me, I check BOL, and it seems
Result Types
Returns the highest precedence type from the set of types in result_expressions and the optional else_result_expression. For more information, see Data...
July 22, 2008 at 8:51 am
Viewing 15 posts - 796 through 810 (of 1,082 total)