This script creates a table and populates it with information about all dates between a (configurable) start date and end date.It creates a table called MyDates in a database called MyDB in which this is done but the script can be easily edited create the table in whichever DB you want it with whatever name […]
2004-10-28 (first published: 2004-08-20)
327 reads
Here is a simple view that is useful to pull basic data dictionary information out of your DB user tables. The description field is an extended property that I like to use for built in documentation of fields. This only works with 2000, 7 had a slightly different layout for the system tables.
2004-10-27 (first published: 2004-08-20)
333 reads
Updated! Now supports both SQL Litespeed and native backup commands in one script! Several new bug fixes please see the header of the script. Error messages to add are now at the bottom of the script! This stored procedure will backup a single database or all databases it will also perform ether a full, diff, […]
2004-10-26 (first published: 2004-05-27)
984 reads
usp_restore - This will restore a backup performed with SQL LiteSpeed from DBAssocatesIT or by the standard backup database routines in SQL Server Please check below the declarations to find the user settable options for this script If the target database is currently in a loading status or cannot be read from this restore it […]
2004-10-25 (first published: 2004-05-27)
611 reads
A kind of sp_lock with an ORDER BY possibility. It gives also the name of the locked object (table) if executed in the same database.
2004-10-22 (first published: 2004-07-26)
683 reads
This code will show rows from 17th and then next 3 ordered by name from table authors in database pubs. Table must have primary key and of course ordered column. You can change value 'from' in line 'SET ROWCOUNT 17' and value 'next' (how many rows)in line SELECT TOP 3. It is good to show […]
2004-10-21 (first published: 2004-07-29)
194 reads
integer IP-address converted to varchar dot-notationUsage SELECT dbo.IPNumberToString(-2037012288)
2004-10-20 (first published: 2004-07-29)
424 reads
This is a modification to Automate Audit Trigger Generation at http://www.sqlservercentral.com/scripts/contributions/1073.asp by walkerjet. The changes were made to accommodate tables using different types for their primary keys, (i.e. int, smallint, char, etc.), add the ModifiedById and DTStamp columns, exclude legacy tables that do not have a primary key defined, exclude fields of type text, ntext, […]
2004-10-19 (first published: 2004-07-29)
352 reads
After seeing a thread in the forums about converting a Julian date to Gregorian, I decided to write these functions. There are two functions in the script, getJulian and getGregorian. getJulian accepts a datetime parameter and returns the Julian date as an integer. getGregorian accepts an integer and returns the Gregorian date as datetime. A […]
2004-10-18 (first published: 2004-08-03)
1,083 reads
This User defined Function will provide you the facility of fetching the nth Value from a Delimited string. The Parameter for the function which you have to pass is, the Delimited String, the Delimiter of the string, nth Position of the string. In this function , you can dynamically change the Delimiter as well as […]
2004-10-15 (first published: 2004-08-04)
1,349 reads