Viewing 15 posts - 5,476 through 5,490 (of 10,143 total)
TheSQLGuru (10/4/2012)
PRIMARY KEY (ID),
UNIQUE (ID))
2) I can probably count on...
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
October 4, 2012 at 8:30 am
Do you have another column in your existing table to identify what type of phone number it is? Mobile/work/home etc?
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
October 4, 2012 at 8:08 am
PiMané (10/4/2012)
ChrisM@Work (10/4/2012)
SSC has just the article for you, right here[/url]. No need to redesign the wheel just yet 😉My initial thoughts are right then 🙂
Thx,
Pedro
Reckon so 😉
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
October 4, 2012 at 7:58 am
dwain.c (10/4/2012)
Eugene Elutin (10/4/2012)
ChrisM@Work (10/4/2012)
Eugene Elutin (10/4/2012)
ChrisM@Work (10/4/2012)
No undocumented vapourtables, no sort:
SELECT n = a.n+b.nFROM (VALUES(0),(10),(20),(30),(40),(50),(60),(70),(80),(90))b(n)
CROSS JOIN (VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10))a(n)
😉
No sort? I would suggest to add ORDER BY, otherwise order is not...
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
October 4, 2012 at 7:47 am
Eugene Elutin (10/4/2012)
ChrisM@Work (10/4/2012)
Eugene Elutin (10/4/2012)
ChrisM@Work (10/4/2012)
No undocumented vapourtables, no sort:
SELECT n = a.n+b.nFROM (VALUES(0),(10),(20),(30),(40),(50),(60),(70),(80),(90))b(n)
CROSS JOIN (VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10))a(n)
😉
No sort? I would suggest to add ORDER BY, otherwise order is not guaranteed,...
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
October 4, 2012 at 7:46 am
PiMané (10/4/2012)
ChrisM@Work (10/4/2012)
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
October 4, 2012 at 7:30 am
Eugene Elutin (10/4/2012)
ChrisM@Work (10/4/2012)
No undocumented vapourtables, no sort:
SELECT n = a.n+b.nFROM (VALUES(0),(10),(20),(30),(40),(50),(60),(70),(80),(90))b(n)
CROSS JOIN (VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10))a(n)
😉
No sort? I would suggest to add ORDER BY, otherwise order is not guaranteed, so you may...
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
October 4, 2012 at 7:01 am
PiMané (10/4/2012)
PiMané (10/4/2012)
ChrisM@Work (10/4/2012)
Post the actual execution plans as .sqlplan attachments. It's difficult to determine anything useful from these figures.Thanks... here it is.
Pedro
The plans are almost the same except for...
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
October 4, 2012 at 6:57 am
No undocumented vapourtables, no sort:
SELECT n = a.n+b.n
FROM (VALUES(0),(10),(20),(30),(40),(50),(60),(70),(80),(90))b(n)
CROSS JOIN (VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10))a(n)
😉
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
October 4, 2012 at 6:50 am
This has to be homework because it's very simple.
Try ROW_NUMBER() OVER (PARTITION BY something ORDER BY somethingelse)
You will need to set it up as a CTE or derived table in...
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
October 4, 2012 at 6:11 am
This should be close.
MERGE [DBname].[dbo].[Space] AS target
USING [DBname].[dbo].[RawData_Space] AS source
ON target.SPACE_ID = source.SPACE_ID
WHEN MATCHED THEN
...
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
October 4, 2012 at 6:08 am
maida_rh (10/4/2012)
E.g :
Select LTRating ,RHDate from Accounts...
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
October 4, 2012 at 5:38 am
Post the actual execution plans as .sqlplan attachments. It's difficult to determine anything useful from these figures.
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
October 4, 2012 at 5:20 am
deepakagarwalathome (10/3/2012)
Thanks for that!I fully understand what you are trying to do with the CTE's. I have run the query with the CTE's.
The problem, however, remains the same, 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
October 4, 2012 at 5:13 am
deepakagarwalathome (10/2/2012)
Thanks a zillion for your response. That works fine. No problems.
A couple of questions though :-
First, whilst both 'Over Partiion By...' and the derived table sub-query do the...
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
October 3, 2012 at 9:51 am
Viewing 15 posts - 5,476 through 5,490 (of 10,143 total)