Ever wanted to add a UNIQUE constraint WITH NOCHECK ? Maybe you had some duplicates in your data, fixed the code, but you cannot remove the duplicates, or maybe it’s a “temporary” thing.
Read more »
Category Archives: TSQL
Add UNIQUE constraint WITH NOCHECK ? Not really …
Posted by Horia
on 19/05/2015
2 comments
Automating restores for Ola Hallengren backup solution
Posted by Horia
on 11/05/2015
9 comments
While going through Brent Ozar’s 6-Month DBA Training Plan, I got myself a good challenge quite fast, after reading “Automating Restores” – to automate restores on backups taken using Ola Hallengren Backup Solution. Read more »
Safe exit from WHILE loop using ##global temp tables
Posted by Horia
on 05/04/2015
2 comments
Loops, SQL Server – these two things don’t go along as best friends, but every once in a WHILE, there’s no other way around. If I also add transactions, i surely want to have full control over it.
Read more »
Order NULLs last (numeric only)
Posted by Horia
on 22/03/2015
No comments
Every now and then I need to sort data by a numeric value and NULLs always come first. And I want them last.
Read more »