Scripts

Technical Article

Create a table of dates

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 […]

5 (1)

You rated this post out of 5. Change rating

2004-10-28 (first published: )

327 reads

Technical Article

Schema View

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.

You rated this post out of 5. Change rating

2004-10-27 (first published: )

333 reads

Technical Article

yet another backup script using litespeed or native backup

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, […]

You rated this post out of 5. Change rating

2004-10-26 (first published: )

984 reads

Technical Article

Yet another restore script usp_restore

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 […]

You rated this post out of 5. Change rating

2004-10-25 (first published: )

611 reads

Technical Article

Select from x th row next y rows

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 […]

You rated this post out of 5. Change rating

2004-10-21 (first published: )

194 reads

Technical Article

Modification to Automate Audit Trigger Generation

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, […]

You rated this post out of 5. Change rating

2004-10-19 (first published: )

352 reads

Technical Article

Julian and Gregorian Conversion Functions

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 […]

You rated this post out of 5. Change rating

2004-10-18 (first published: )

1,083 reads

Technical Article

From a Delimited String, fetching the nth Value

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 […]

You rated this post out of 5. Change rating

2004-10-15 (first published: )

1,349 reads

Blogs

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Read the latest Blogs

Forums

Writer methods in PowerQuery (LOL)

By pietlinden

I'm using PowerQuery in Excel on my desktop. (Yeah, I know you can do...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers