Viewing 15 posts - 781 through 795 (of 1,183 total)
It's my understanding that the query optimizer treats them both the same.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 9, 2007 at 7:30 am
Ah Ha!
Thanks.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 2:51 pm
Jeff,
Actually, after you asked, I did a bit more testing and I was completely backwards in my statement.
So if anyone wants to double check, please do.....
I built a testData table...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 2:10 pm
Peter Larsson (11/8/2007)
Use "UNION ALL" or "UNION".
Peter, do you have any reasoning why UNION or UNION ALL would be preferred over my solution? Just curious.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 12:15 pm
Wade,
One thing, you're not handling the case when the EXPIRATION field is equal to 1/1/07, but my code below does. It will put those records into the expired group.
SELECT
...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 12:09 pm
Adam Haines (11/8/2007)
Jason,Which script from PW did you compare to yours, the CTE or the subquery one?
the CTE
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 10:15 am
Wow, that's pretty nice PW!
Trigger, can you run both of these against your data and get the execution stats. My test shows PW's is a HUGE amount faster.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 9:57 am
AH, you fixed your code right as I made my last post.... LOL
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 8:43 am
Adam Haines (11/8/2007)
The original specification required that the data be in a not incrmental format. For example, if A11 has 2 then it should be...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 8:42 am
😀
Now that's funny, but it just goes to show something that I learned a long time ago and struggle to remember every day and that's "Don't assume anything" .... *grin*
No...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 8:30 am
Dfalir,
Take a look at Matt's post. He's said it a bit better than I have. But I believe my code does exactly what you stated. Other than your definition doesn't...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 7:45 am
I think we're not querying with the same restrictions here. My queries do NOT incorporate an end date as you defined in the first post. What do you get when...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 7:26 am
Dfalir (11/8/2007)
.... Keep in mind that the years presented are not fixed. They are just 3 years and on from the current year. For example when 2008 come, the...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 6:58 am
The only thing I can see is the
TC_NUMBER LIKE ('%' + @Centre + '%')
vs.
TC_NUMBER = '0009'
Are the results still different if you change that part of the test query?
FYI,...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 6:54 am
Point well made Bob. 😀
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgNovember 8, 2007 at 6:43 am
Viewing 15 posts - 781 through 795 (of 1,183 total)