August 15, 2014 at 4:29 am
Koen Verbeeck (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/14/2014)
You can try out these methods as previously suggestedHowever OP said
I really don't like this temp table creation
So, no row number, no temp tables. Really limits the options.
And no loops!
And no reasons why...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 15, 2014 at 7:55 am
Is this a homework question?
August 15, 2014 at 8:15 am
Can you provide more reasons why you need a row number? There might be a solution that doesn't involve row number directly.
August 15, 2014 at 11:39 am
Koen Verbeeck (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/14/2014)
You can try out these methods as previously suggestedHowever OP said
I really don't like this temp table creation
So, no row number, no temp tables. Really limits the options.
And no loops!
Can one use pixy dust?
π
August 15, 2014 at 11:58 am
Since the OP provided no reason why not to use ROW_NUMBER() or temp tables (in spite of being asked again and again), I can't see why we should continue to brainstorm elaborate work-arounds.
August 15, 2014 at 12:46 pm
Eirikur Eiriksson (8/15/2014)
Koen Verbeeck (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/14/2014)
You can try out these methods as previously suggestedHowever OP said
I really don't like this temp table creation
So, no row number, no temp tables. Really limits the options.
And no loops!
Can one use pixy dust?
Only if it's ANSI Standard dust.
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
August 15, 2014 at 1:36 pm
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/15/2014)
Koen Verbeeck (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/14/2014)
You can try out these methods as previously suggestedHowever OP said
I really don't like this temp table creation
So, no row number, no temp tables. Really limits the options.
And no loops!
Can one use pixy dust?
Only if it's ANSI Standard dust.
BWAAA-HAAA!!!! Oh my poor internal eyes! I just got this real live vision of Joe Celko in a tu-tu under his black vest flying around with little wings with ANSI stamped on one and ISO stamped on the other with a magic wand that looked like a rolled up Hollerith card. Gonna take a lot of beer tonight to get rid of that image!
--Jeff Moden
Change is inevitable... Change for the better is not.
August 15, 2014 at 1:44 pm
Jeff Moden (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/15/2014)
Koen Verbeeck (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/14/2014)
You can try out these methods as previously suggestedHowever OP said
I really don't like this temp table creation
So, no row number, no temp tables. Really limits the options.
And no loops!
Can one use pixy dust?
Only if it's ANSI Standard dust.
BWAAA-HAAA!!!! Oh my poor internal eyes! I just got this real live vision of Joe Celko in a tu-tu under his black vest flying around with little wings with ANSI stamped on one and ISO stamped on the other with a magic wand that looked like a rolled up Hollerith card. Gonna take a lot of beer tonight to get rid of that image!
Thank you, Jeff. Now we've all had the image of Joe in a tu-tu. :sick: I think it's time to go home. Can DBCC TIMEWARP being applied to do a selective truncate against my memory only to a point-in-time? Or where's that Clorox that Sean posted?
I personally can't wait to hear the reasoning against ROW_NUMBER() or the aversion to temp tables.
August 15, 2014 at 3:21 pm
Ed Wagner (8/15/2014)
Jeff Moden (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/15/2014)
Koen Verbeeck (8/15/2014)
GilaMonster (8/15/2014)
Eirikur Eiriksson (8/14/2014)
You can try out these methods as previously suggestedHowever OP said
I really don't like this temp table creation
So, no row number, no temp tables. Really limits the options.
And no loops!
Can one use pixy dust?
Only if it's ANSI Standard dust.
BWAAA-HAAA!!!! Oh my poor internal eyes! I just got this real live vision of Joe Celko in a tu-tu under his black vest flying around with little wings with ANSI stamped on one and ISO stamped on the other with a magic wand that looked like a rolled up Hollerith card. Gonna take a lot of beer tonight to get rid of that image!
Thank you, Jeff. Now we've all had the image of Joe in a tu-tu. :sick: I think it's time to go home. Can DBCC TIMEWARP being applied to do a selective truncate against my memory only to a point-in-time? Or where's that Clorox that Sean posted?
I personally can't wait to hear the reasoning against ROW_NUMBER() or the aversion to temp tables.
That should teach you Ed, always checkpoint before reading the posts:-P Jeff, you are going to need something with a lot more umpf than a beer to clear this one out, cannot help thinking of how you are going to react next time you meet him in person:-D
π
BTW Jeff, "thanks" for sharing.......\0/...........
August 15, 2014 at 10:02 pm
Yes ....Plz close this discussion..
Im okkkkkkkkkk to use row number as there doesn't seems to be better option..
Thanks to all
Viewing 10 posts - 16 through 24 (of 24 total)
You must be logged in to reply to this topic. Login to reply