The use of union would seem to force a distinct in each of the select statements being unioned. The use multiple unions, with mixed union and union all clauses, seems to cause haphazard results.
2013-05-14 (first published: 2013-04-30)
935 reads
I had a requirement to produce a formatted currency string from within SQL server. I was able to build this scalar-valued function to meet the requirement.
2013-05-13 (first published: 2013-05-03)
1,080 reads
Scripts will display size of the data in the database/data files and remaining allocated space.
2013-05-10 (first published: 2008-11-17)
3,777 reads
Use to check for a string value in a job steps output file. If that string exists, send an email with the output file attached.
2013-05-09 (first published: 2008-09-04)
5,454 reads
The idea was taken from this script: http://www.sqlservercentral.com/scripts/Maintenance+and+Management/61448/
Which did not work in SQL 2005 due to table changes on MSDB
2013-05-08 (first published: 2008-02-12)
5,566 reads
This script uses the backup tables to get info on the growth of your database files.
2013-05-07 (first published: 2009-02-03)
15,029 reads
Use this and shrunk a 176GB in under 20 secs to 105 MB. Ensure that you understand the potential issues with the recovery of your database.
2013-05-06 (first published: 2008-07-21)
13,997 reads
Query Active Directory Computer objects to verify existence
2013-05-01 (first published: 2013-04-16)
1,110 reads
Pre-Create Active Directory Virtual Computer objects to support a new SQL Cluster
2013-04-30 (first published: 2013-04-15)
980 reads
Changes DB owner to sa for Online DB's where owner is not sa
2013-04-26 (first published: 2013-04-12)
2,746 reads