Viewing 6 posts - 1 through 6 (of 6 total)
Great article Mark,
I was going to implement a manual "shrink file" solution for a client next year but this looks much a better solution for me. But we will modify...
December 17, 2016 at 11:25 am
First convert the date to a date time and then convert the result produces the expected result.
SELECT CAST ('29-Feb-2016' as datetime)
SELECT CONVERT (CHAR(20), CAST ('29-Feb-2016' as datetime), 108)
SELECT CONVERT (CHAR(8),...
June 20, 2016 at 8:46 am
Changing the CONVERT to CHAR(11) instead of CHAR(8) does the trick. This, I guess, is the real error that should be solved.
SELECT CAST (CONVERT (CHAR(11), '29-Feb-2016', 108) as Date)
June 20, 2016 at 8:41 am
I personally like to also add a version table to the database, so that you can track which scripts that have been executed and by whom.
When you have many...
November 17, 2015 at 6:17 am
Sorry, it was a bit drastic to say it always gives better performance, I should have said normally gives same performance or better. In the example case of the article...
May 25, 2010 at 7:52 am
Good comparison, David, thanks.
From a performance perspective, using NOT IN is "always" slower than using EXISTS. If you try running the below queries
-- INTERSECT
SELECT CustomerID
FROM Sales.Customer
WHERE TerritoryID=10
AND NOT EXISTS (
SELECT...
May 24, 2010 at 1:48 am
Viewing 6 posts - 1 through 6 (of 6 total)