June 1, 2011 at 3:45 am
Some people really dont want to be helped do they :crazy:
http://www.sqlservercentral.com/Forums/Topic1116629-9-3.aspx#bm1117914
June 1, 2011 at 4:27 am
Dave Ballantyne (6/1/2011)
Some people really dont want to be helped do they :crazy:http://www.sqlservercentral.com/Forums/Topic1116629-9-3.aspx#bm1117914
Yeah...
I always wonder about the threads where someone asks for a bunch of information and the OP replies to one question, then the person asks for the rest of the information and the OP replies to one of them, ....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 1, 2011 at 4:44 am
GilaMonster (6/1/2011)
I always wonder about the threads where someone asks for a bunch of information and the OP replies to one question, then the person asks for the rest of the information and the OP replies to one of them, ....
The RBAR way of asking a question...?
June 1, 2011 at 4:51 am
mazzz (6/1/2011)
The RBAR way of asking a question...?
QBAQ , i like it π
June 1, 2011 at 6:49 am
Dave Ballantyne (6/1/2011)
mazzz (6/1/2011)
The RBAR way of asking a question...?
QBAQ , i like it π
:-P:-P:-P
CTE or Cursor?
June 1, 2011 at 7:43 am
Greg Edwards-268690 (6/1/2011)
Dave Ballantyne (6/1/2011)
mazzz (6/1/2011)
The RBAR way of asking a question...?
QBAQ , i like it π
:-P:-P:-P
CTE or Cursor?
The person trying to respond quickly becomes the Cursor
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
Itβs unpleasantly like being drunk.
Whatβs so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
June 1, 2011 at 7:49 am
GilaMonster (6/1/2011)
Dave Ballantyne (6/1/2011)
Some people really dont want to be helped do they :crazy:http://www.sqlservercentral.com/Forums/Topic1116629-9-3.aspx#bm1117914
Yeah...
I always wonder about the threads where someone asks for a bunch of information and the OP replies to one question, then the person asks for the rest of the information and the OP replies to one of them, ....
GilaMonster (6/1/2011)
Blood from a stone...
In this case, it seems like it would be easier getting blood from a stone than getting all of your questions answered...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 1, 2011 at 8:18 am
Greg Edwards-268690 (6/1/2011)
Dave Ballantyne (6/1/2011)
mazzz (6/1/2011)
The RBAR way of asking a question...?
QBAQ , i like it π
:-P:-P:-P
CTE or Cursor?
Definitely a while loop
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 1, 2011 at 9:15 am
Would you call this recursive?
WITH cte (Curse) AS
(
SELECT 'Dammit'
UNION ALL
SELECT Curse from cte
)
select Curse from cte
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
June 1, 2011 at 9:37 am
The Dixie Flatline (6/1/2011)
Would you call this recursive?
WITH cte (Curse) AS
(
SELECT 'Dammit'
UNION ALL
SELECT Curse from cte
)
select Curse from cte
Yes - but just not enough
;
WITH cte (Curse) AS
(
SELECT 'Holy Mother of Pearl Batman'
UNION ALL
SELECT Curse from cte
)
select Curse from cte
OPTION (MAXRECURSION 0)
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 1, 2011 at 9:41 am
The Dixie Flatline (6/1/2011)
Would you call this recursive?
WITH cte (Curse) AS
(
SELECT 'Dammit'
UNION ALL
SELECT Curse from cte
)
select Curse from cte
I'm more inclined to go with something like this:
DECLARE @numrows INT
,@TopRange INT
SET @TopRange = 1000
SET @numrows = ABS(CHECKSUM(NEWID()))%@TopRange+1
;
with curse (rownum,curse) AS (
SELECT 1,'Damnit'
UNION
SELECT 2,'Flip'
UNION
SELECT 3,'SHIP'
),rand1 as (
SELECT TOP (@numrows)
RowNum = ROW_NUMBER() over (order by (Select 1))
,SomeInt = ABS(CHECKSUM(NEWID()))%@TopRange+1
FROM Master.dbo.SysColumns t1
CROSS JOIN Master.dbo.SysColumns t2
)
Select cc.curse
from rand1
CROSS APPLY (
Select TOP (@numrows) SomeInt,RowNum
from rand1
) ct
CROSS APPLY
(SELECT rownum,curse FROM curse) cc
ORDER BY NEWID()
Insert your random cursors where you wish, change the variables and attach speech to the output.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 1, 2011 at 9:49 am
The Dixie Flatline (6/1/2011)
Would you call this recursive?
WITH cte (Curse) AS
(
SELECT 'Dammit'
UNION ALL
SELECT Curse from cte
)
select Curse from cte
Brings me back to the beginning of my days (pun intended). A different language entirely:
10 Print "I'm not a Re-Curser but I am a Re-Cursor."
20 GOTO 10
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
June 1, 2011 at 9:58 am
Jim Murphy (6/1/2011)
The Dixie Flatline (6/1/2011)
Would you call this recursive?
WITH cte (Curse) AS
(
SELECT 'Dammit'
UNION ALL
SELECT Curse from cte
)
select Curse from cte
Brings me back to the beginning of my days (pun intended). A different language entirely:
10 Print "I'm not a Re-Curser but I am a Re-Cursor."
20 GOTO 10
HAHA
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 1, 2011 at 11:32 am
Insert your random cursors where you wish, change the variables and attach speech to the output.
Shut the front door....
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
June 1, 2011 at 11:43 am
The Dixie Flatline (6/1/2011)
Insert your random cursors where you wish, change the variables and attach speech to the output.
Shut the front door....
May have to shut it for quite a long time too π
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 15 posts - 26,851 through 26,865 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply