T-SQL

Technical Article

From a Delimited String, fetching the nth Value

  • Script

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,356 reads

Technical Article

Modification to Automate Audit Trigger Generation

  • Script

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

Select from x th row next y rows

  • Script

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

Detect Object dependencies.

  • Script

This stored procedure will detect all first level object dependencies on Stored Procedure.The result set will be stored in table Depend. Unlike sp_depends, sp_MSdependencies will be able to detect all links and dependencies associated to an object. It includes TRIGGER, DELETE, UPDATE etc .

You rated this post out of 5. Change rating

2004-07-30 (first published: )

326 reads

Technical Article

sp to drop multiple similarly named db

  • Script

Procedure:    usp_drop_multiple_databases Description:    This procedure will take a string as input (it can take the % character in the calling string), put all db like that name into a list, and then drop all the databases in the resultant list.                    Example calling syntax: usp_drop_multiple_databases 'test_%_delete'--> Will drop ALL databases with a […]

You rated this post out of 5. Change rating

2004-07-29 (first published: )

73 reads

Blogs

My 2024 in Data: Music

By

This is my last week of the year working (I guess I come back...

A New Word: Suente

By

suente– n. the state of being so familiar with someone that you can be...

Side Projects

By

Anyone (everyone?) who has ever tried to learn a programming language knows that to...

Read the latest Blogs

Forums

Attaching an SQL Server database without Transaction Log Files through SQL Server Management Studio.

By Noman072

Comments posted to this topic are about the item Attaching an SQL Server database...

Superseded Indexes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Superseded Indexes

Timeout Error while executing a TSQL statement in Sql server Express Edition

By IT researcher

I am getting the below error when I execute a SQL command in SQL...

Visit the forum

Question of the Day

Superseded Indexes

Which of these indexes is superseded by another?

See possible answers