Viewing 15 posts - 391 through 405 (of 2,894 total)
Do you mean your comparison of TARGET.Column1 <> SOURCE.Column1 is not working when one of this is NULL?
There are few ways to deal with it. Here is one, I guess...
May 24, 2013 at 3:27 am
DDL of table and sample data in a format of INSERT statements would really help.
Please read this one: http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you follow the above, the relevant help will arrive much sooner...
May 23, 2013 at 11:03 am
May 23, 2013 at 7:44 am
richard.noordam (5/22/2013)
First.... let's just assume i know sets should be used instead of cursors in most cases, and skip all the comments on that.
Cursors are absolutely fine where relevant.
Assume we...
May 22, 2013 at 9:49 am
Bhaskar.Shetty (5/22/2013)
GilaMonster (5/22/2013)
Bhaskar.Shetty (5/22/2013)
but adding indexes for each and every column mince adding overheads on index maintanance also.
You wouldn't want to do that and it would be entirely useless to...
May 22, 2013 at 8:41 am
geoff5 (5/22/2013)
After reading your explanation of the reason why GROUP BY is more efficient than window functions, I can see the logic in your in-line view solution. I would still...
May 22, 2013 at 8:32 am
One suggestion Skipping char/varchar columns from groupby clause gives you better query performance, for the final output result where you need Name in your case rejoin the table with...
May 22, 2013 at 5:35 am
shettybhas (5/22/2013)
SELECT *
FROM @mySampleTable s
OUTER APPLY (SELECT TOP 1 CaseID FROM @mySampleTable g WHERE s.CaseID = g.CaseID
...
May 22, 2013 at 5:27 am
geoff5 (5/21/2013)
I'm not an expert at execution plans, so I can't speak definitively on which approach is more efficient, but intuitively it would seem to me that referencing the raw...
May 22, 2013 at 3:29 am
The fastest way to calculate "running" total in SQL is here:
http://www.sqlservercentral.com/articles/T-SQL/68467/
SQL2012 now has in-build functionality for doing that, but the above method still wins most of the time.
May 22, 2013 at 2:58 am
It's possible in most of programming languages which can be used to program UI.
However, T-SQL has nothing to do with it. It's about data.
What are you using programming in? .NET?...
May 21, 2013 at 7:30 am
It can be done without using windowed function (so, will have better performance):
SELECT *
FROM @mySampleTable s
WHERE s.CaseID IN (SELECT CaseID
...
May 21, 2013 at 2:46 am
Are you producing the report?
This one is one of the most stupid requirements I ever seen.
Zero, as a numeric thing, cannot be negative. Some times it used for...
May 20, 2013 at 4:49 am
Are these statements used inside of proc code or outside?
If the later, then I guess that developer who sent you this code just scripted something in SSMS and...
May 20, 2013 at 4:41 am
Viewing 15 posts - 391 through 405 (of 2,894 total)