Viewing 15 posts - 181 through 195 (of 4,080 total)
Mr. Snyder, it works like a charm.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 19, 2016 at 4:23 pm
Thanks for sharing that, Mr. Snyder !!
I'll have to test it out against the Wiki list of Easter Sundays posted HERE.
Maybe Steve will let me edit the article to...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 19, 2016 at 2:35 pm
Thank you, gentlemen. That was driving me bonkers.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 8:47 pm
Okay, I'm at a loss to explain this one. It's a mystery worth looking at.
http://www.sqlservercentral.com/Forums/Topic1818131-3077-1.aspx
Edited to add: Although he is showing them as heaps,...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 7:18 pm
Curiouser and curiouser, your code actually seems to run correctly on my limited testing.
When there is a date range match and a dup match, a row doesn't display.
When there is...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 7:01 pm
Although this is too little too late, you might reconsider that IN clause for the future. Use a non-existence test instead. You'll get the error you expect....
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 6:56 pm
It didn't return an error for me either. Even with data in both tables.
Have you reported it to Microsoft?
You say you fat-fingered it. Did...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 6:51 pm
drew.allen (9/15/2016)
The Dixie Flatline (9/15/2016)
select p.id, p.FirstName, p.LastName, p.dob, pf.pos,pf.Hobby, pf.Color, pf.SQLConference
from @Person p
join @Person_Favorites pf on p.ID = pf.ID
--where pf.SQLConference like 'SQL%'
--where...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 3:46 pm
Are you trying to take normalization a step further and create separate tables for possible colors, hobbies, and SQLConferences?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 3:13 pm
Also, get rid of scalar functions in queries wherever possible. Inline table valued functions perform wayyy better.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 2:57 pm
If some of your joins are to tables that simply provide descriptions, I'm a big fan of converting those joins to inline table-valued functions. I inherited...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 2:55 pm
What about those two tables is not normalized?
select p.id, p.FirstName, p.LastName, p.dob, pf.pos,pf.Hobby, pf.Color, pf.SQLConference
from @Person p
join @Person_Favorites pf on p.ID = pf.ID
--where pf.SQLConference like 'SQL%'
--where color = 'Green'
where lastname...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 2:45 pm
The thing I've realized from this, which should have been obvious, is that when you loop through batches using TOP, you're always doing a table scan from the beginning and...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 2:21 pm
I don't think I've ever done a RIGHT JOIN in production. :ermm:
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 11:35 am
Hey, I want a +1 too !!
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 10:15 am
Viewing 15 posts - 181 through 195 (of 4,080 total)