Viewing 15 posts - 4,561 through 4,575 (of 10,143 total)
TheSQLGuru (6/3/2013)
It's quicker to write FROM x a, x b than it is to track down the inline tally table code.
That's what Snippets are for silly! 😀 Actually...
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
June 3, 2013 at 8:33 am
TheSQLGuru (5/24/2013)
ChrisM@Work (5/23/2013)
Bex (5/23/2013)
Nice solution btw, Chris.Bex
Gosh, thanks! :blush:
It truly is an elegant solution Chris! Kudos.
However, I will nit-pick on using sys.columns for the driver. 😎 That...
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
June 3, 2013 at 7:09 am
Rauf Miah (6/3/2013)
companycode [nchar(4)] actcode [nchar(12)] vounum [nchar(14)] trnam [decimel (18,6)]
I like to build...
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
June 3, 2013 at 6:43 am
Rather than posting the solution, here's an excellent spackle article by Jeff Moden which explains how to do this and extends the functionality too:
http://www.sqlservercentral.com/articles/T-SQL/88244/%5B/url%5D
Reading the article will cost you about...
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
June 3, 2013 at 6:40 am
Bex (5/23/2013)
Nice solution btw, Chris.Bex
Gosh, thanks! :blush:
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
May 23, 2013 at 5:56 am
Bex (5/23/2013)
eg --) l9 rather than just ) l9
If I comment out the last line,...
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
May 23, 2013 at 5:56 am
todd.ayers (5/22/2013)
I have finally had a chance to test this and I keep getting an error message saying:
Msg...
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
May 23, 2013 at 5:10 am
dwain.c (5/22/2013)
That is a brilliant solution Chris!
And here I thought when I pulled up this thread I could make a shameless plug for my random numbers article (in my signature).
Thanks...
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
May 23, 2013 at 1:01 am
todd.ayers (5/22/2013)
I have finally had a chance to test this and I keep getting an error message saying:
Msg...
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
May 23, 2013 at 12:58 am
GilaMonster (5/22/2013)
ChrisM@Work (5/22/2013)
Is it just me or is there really a hike in hideously BS answers this week? Not on this thread of course, the "worker threads"
Yes. Very much...
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
May 22, 2013 at 7:20 am
Is it just me or is there really a hike in hideously BS answers this week? Not on this thread of course, the "worker threads" (ahem).
Brandie, I read your account...
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
May 22, 2013 at 5:55 am
sivaraman8282 (5/22/2013)
thanks Newbie. I removed nvarchar field(T.Name) from group by area. Now, the performance is good compare to previous one.
Be careful with the conclusions you draw from this because if...
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
May 22, 2013 at 5:50 am
e4d4 (5/22/2013)
It depends, you did not give tables definition and actual execution plan, but this query looks like a good candidate to try indexed views.
Can you explain why? This is...
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
May 22, 2013 at 4:55 am
karim.boulahfa (5/22/2013)
I dont get any valuas out the Query ??
It's very difficult to rework someone else's code without data to run the code against. That's why I wrote "Something like...
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
May 22, 2013 at 1:14 am
This is What'sUp Gold data. What version of SQL Server is hosting it?
The left joins in the query will be converted into inner joins by the child table joins:
INNER...
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
May 21, 2013 at 9:07 am
Viewing 15 posts - 4,561 through 4,575 (of 10,143 total)