Viewing 15 posts - 1,726 through 1,740 (of 10,143 total)
Grumpy DBA (2/23/2016)
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
February 23, 2016 at 5:50 am
Your two queries are logically different - sorry if I was ambiguous, what I meant was remove the NULL checks on the join columns only, like this:
SELECT COUNT(1)
FROM PaleoData.Tax.PodrobnostiTmp...
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
February 23, 2016 at 3:26 am
Check that "auto create statistics" is enabled for the database.
Inner joins eliminate null values of the join columns:
inner join PaleoData.Tax.PodrobnostiTmp P2
on p1.Family_13000 = p2.Family_13000
you don't need to check...
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
February 23, 2016 at 2:40 am
sushil_dwid (2/23/2016)
Could you please suggest the index on table(dbo.person) that can fast my below sql..
select Region,type,UID,Week
(select Region,type,UID,
CASE
WHEN epu.updatetime...
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
February 23, 2016 at 2:23 am
spaghettidba (2/23/2016)
CONVERT(date, RIGHT(Date1,2) + SUBSTRING(Date1, 3,2)...
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
February 23, 2016 at 2:13 am
The fastest index for the 2006 query was index 3, which isn't covering. Can you post the execution plan you get for this?
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
February 19, 2016 at 9:58 am
Have you tried a crosstab query? Immensely useful technique to learn, easier to figure out than PIVOT (and usually faster too).
This excellent article by Jeff Moden [/url]shows you how...
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
February 19, 2016 at 5:53 am
Preliminary results:
create index ix_helper01 ON #TestTable (StartDate,EndDate) INCLUDE (wide)
create index ix_helper02 ON #TestTable (EndDate,StartDate) INCLUDE (wide)
DECLARE @Now DATETIME = GETDATE()
select sum(datalength(wide)) Some_field_information
from #testtable WITH (INDEX (ucx_Stuff))
where StartDate < '20160301'...
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
February 18, 2016 at 10:01 am
Nikku (2/18/2016)
I have two tables t1 & t2 which contains the same records. t1 is for bank1 & t2 is for bank2
i.e t1
accno name balance
001000 a ...
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
February 18, 2016 at 6:04 am
ben.brugman (2/18/2016)
Jeff Moden (2/16/2016)
ben.brugman (2/16/2016)
Still working on situations where we want to select a specific period and subscribers at that moment.Please see the following article for that...
Did read your article....
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
February 18, 2016 at 1:55 am
imba (2/17/2016)
I am speechless. THANK YOU SOOOOO MUCH.
You're welcome, thanks for the feedback.
Be sure to read Dwain's excellent article linked by Luis.
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
February 18, 2016 at 1:35 am
SELECT COL1, COL2, COL3, x.*
FROM #TEST
CROSS APPLY (VALUES (ITEM1, DESC1),(ITEM2, DESC2),(ITEM3, DESC3)) x (COL4, COL5)
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
February 17, 2016 at 7:43 am
Mark Cowne (2/17/2016)
A couple of tweaks to Chris's query should do it
Funny - the first time I saw this technique used was in one of your posts, Mark.
Thanks 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
February 17, 2016 at 6:48 am
richardmgreen1 (2/17/2016)
I'm testing both and they are very close to what I need.
Chris - yours is closest to what I need but I have found a bit of an...
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
February 17, 2016 at 5:11 am
hoseam (2/17/2016)
Can I get different columns like 'Today', 'Yesterday', 'A day before Yesterday', '3 days prior Today' and '4 days prior Today'?
SELECT
[Today] = MAX(CASE WHEN rn = 5 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
February 17, 2016 at 4:08 am
Viewing 15 posts - 1,726 through 1,740 (of 10,143 total)