SQLInsider Scripts

Technical Article

IP Numeric To String

  • Script

A user defined function that converts an integer value to an IP address in dot notation format. This is performed by promoting a 32 bit signed integer value to a signed 64 bit bigint and converted to a binary representation of the integer. The purpose of this script is to allow the storage of an […]

You rated this post out of 5. Change rating

2005-11-01 (first published: )

184 reads

Technical Article

Pad String

  • Script

Pads a string on either with either leading or trailing characters. You specify the direction, the tolal string length and the character to pad with.Error conditions return null

5 (2)

You rated this post out of 5. Change rating

2005-08-19 (first published: )

2,006 reads

Technical Article

Find Table Usage

  • Script

Creates a printable report of all stored procedures, views, triggers and user-defined functions that reference any of the tables passed into the procedure.Wrote this to easily list items affected by table changes when working in a fast-paced development environment developing a shrink wrapped product undergoing many schema changes.Split function is listed after sp definintion

3 (6)

You rated this post out of 5. Change rating

2007-10-23 (first published: )

3,285 reads

Technical Article

Calculate upcoming business day from date (Updated)

  • Script

Calculates the next business day based upon the work weeklength, number of days from the start date and a list of holiday dates kept in a table called HolidayDate.Created this script for determining the next banking day from 2 days after a request for wiring funds. Can be used for things like calculating shipping dates […]

5 (1)

You rated this post out of 5. Change rating

2006-01-19 (first published: )

1,497 reads

Technical Article

move all indexes to a secondary file group

  • Script

Move all (or chosen) standard indexes from your primary file group to a secondary file group (hopefully located on a seperate array)excludes clustered indexes, statistics and indexes associated with a primary keywhen you run it - set the debug to 1 to identify what the script will move, set it to 0 to actually perform […]

4.67 (3)

You rated this post out of 5. Change rating

2006-06-19 (first published: )

5,270 reads

Technical Article

Deleting Sets of Rows in huge table

  • Script

There was a problema user was reflecting http://groups.yahoo.com/group/sqlcon/message/1119What I did was following steps1. Divide the count of table into segments for divide2. Then use the even Odd functionality for smooth looping3. Use a simple while loop and SET ROWCOUNT functionality for further deletions across table with checkpoint4. It saved the log swell up and resources […]

You rated this post out of 5. Change rating

2005-07-20 (first published: )

251 reads

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers