DESCRIPTION:This procedure produces a SELECT statement which explicitly lists all fields for 'tablename' with fieldname and alias as the column name. The SELECT it produces is ready to run or if you need to join several tables just copy the column names off the SELECT it generates. I use this a lot when I create […]
2007-05-22 (first published: 2007-05-19)
207 reads
DESCRIPTION:This procedure will allow you to display results vertically (down) instead of across the screen. It's great when you are dealing with a query that has 50 columns and just a couple of records. LIMITATIONS: * It will be very slow if you are trying to return a lot of records. Works best for queries […]
2007-05-21 (first published: 2007-05-19)
3,204 reads
This is just a quick method to determine the backup mode of all databases on a server. No cursor involed.
2007-05-18 (first published: 2007-05-07)
440 reads
A simple script to find the database recovery model. Cut & paste into Query Analyser
2007-05-17 (first published: 2007-05-08)
2,991 reads
This code provides a way of monitoring the growth of all your databases within a single instance. The first part is the creation of a monitoring table with the initial load of current databases and sizes. The second part is the SQL that can be put in a scheduled job to automate the growth monitoring.It […]
2007-05-16 (first published: 2007-05-08)
24,363 reads
This is a generalised Function that will return a String in Proper Case [Camel Case]. Means Afetr every space, first later will be in UPPER Case.Example:Input String: 'microSoft sql server'Output String: 'Microsoft Sql Server'
2007-05-09 (first published: 2007-04-19)
22,366 reads
This function will return you the month-end date. Input parameter may be any date of that month for which you want to calculate month-end.Example:Input: '2-20-2004' Output: '2-29-2004'Input: '2-15-2004' Output: '2-29-2004'Input: '3-20-2004' Output: '3-31-2004'Input: '3-30-2004' Output: '3-31-2004'
2007-05-08 (first published: 2007-04-19)
1,341 reads
To Retreive List of Default Constraints from current database
2007-05-07 (first published: 2007-04-20)
253 reads
To Retreive List of Default Constraints from current database with PRINT or DROP
2007-05-04 (first published: 2007-04-20)
558 reads
I wrote this little tool out of the frustratingly slow process one must endure to find out what database Recovery Model your SQL 2000 databases are currently set to. This tool will quickly reveal whether your database Recovery model is set to either "Simple", "Full", or "Bulk-Logged." Who has time to manually pull up "Properties" […]
2007-05-03 (first published: 2003-03-06)
831 reads