This is the basic structure of how to dynamically create a pivot table recordset for SQL 2000. In this example, I am using SUM, but it could just as easy be COUNT or any other aggregate function.
2006-05-26 (first published: 2006-05-08)
1,834 reads
The following script runs against the current server and retrieves number of days since last full or differential and the number of days between them. it also retrieves the number of hours since the last transaction log backup.It currently returns a grid output.currently the script is under going changes to send XML back to an […]
2006-05-22 (first published: 2006-04-13)
1,240 reads
To move all the table data from database to xls or doc or txt files tableMany times we come accross to move data from database to external files such as word,xls or data files. Here is the script that move all tables data to specified files. Target file names are the table names. specify the […]
2006-05-20 (first published: 2006-04-05)
1,673 reads
This would help you to send HTML email using T-SQL script, you just need to provide necessary parameters and you would have HTML email.
2006-05-19 (first published: 2006-04-19)
1,461 reads
The calculation of distance between two points using standard spherical geometry can be inaccurate for short distances (ten miles or less) because the sine function of very small angles approaches zero. The haversine approach (http://en.wikipedia.org/wiki/Haversine_formula) turns this around, so it is very accurate at small distances but has larger errors (about ten miles) for points […]
2006-05-18 (first published: 2006-04-25)
671 reads
Following script lists the tables NOT having FK.
2006-05-17 (first published: 2006-04-25)
262 reads
a function to convert a date time value what ever it is to hh:mm:ss format.
2006-05-16 (first published: 2006-04-26)
259 reads
Display a person's initials regardless if they have a middle name or not.Just pass in the persons name
2006-05-15 (first published: 2006-04-27)
558 reads
Data Recovery is vital. This script will cursor through your database and BCP OUT the table data to a directory specifically for each day of the week (in numbers - where 1 = Sunday and 7 = Saturday) in order to have table recoverability up to 7 days. The first step is to create the […]
2006-05-11 (first published: 2006-05-02)
691 reads
This simple select statemetn will convert a DateTime to HH:MM:SS.
2006-05-10 (first published: 2006-05-03)
213 reads