Scripts

Technical Article

scrript to convert datatypes of multiple columns

generates an runs a select statement to convert all th olumns of a certain datatype in apirticular table to another datatype:eg all columns of type int to varchar etc the sp takes three parameters namely the table name, source data type and detination data type generates a select query ad executes it eg: exec ConvertTableTypes […]

You rated this post out of 5. Change rating

2007-07-10 (first published: )

175 reads

Technical Article

Script to find a string in SP/Function/View SQL

I mark my SQL with a 'Todo' symbol whenever I decide something needs work, but I don't have the time to do it right away. So I wrote this usp so that I can get a quick list of stored procedures, function and views that need some extra work.It also comes in handy whenever you […]

You rated this post out of 5. Change rating

2007-07-06 (first published: )

281 reads

Technical Article

Make a time value from a given float value

Clients asked me to show a more detailed and longer text which doesn't have to be edited. So I came up with the following solution/function.This function returns a varchar time value with a description containing how many days, hours and minutes. For example 100.25 returns :'100:15( 4 Days, 4 Hours, 15 Minutes )'.I hope somebody […]

You rated this post out of 5. Change rating

2007-07-04 (first published: )

128 reads

Technical Article

Script to simplify maintenance of sysproperties

This procedure will maintain the sysproperties table by wrapping system procedures:                • sp_addextendedproperty                • sp_dropextendedproperty                • sp_updateextendedproperty            The parameters are:                • @object    --    primary name of the object being to be maintained.                • @column    --    column or parameter […]

You rated this post out of 5. Change rating

2007-07-04

89 reads

Technical Article

Script to simplify maintenance of sysproperties

This procedure will maintain the sysproperties table by wrapping system procedures:                • sp_addextendedproperty                • sp_dropextendedproperty                • sp_updateextendedproperty            The parameters are:                • @object    --    primary name of the object being to be maintained.                • @column    --    column or parameter […]

You rated this post out of 5. Change rating

2007-07-04

427 reads

Technical Article

List all indexes with keys, description and size

This script combines functionality of sp_helpindex and sp_spaceused to list all tables with individual indexes, their keys and description  (sp_spaceused cannot do that) and size in MB per individual index (sp_helpindex cannot do that either). Feel free to use and modify as you see fit. Hope it can help.

5 (9)

You rated this post out of 5. Change rating

2007-07-03 (first published: )

2,652 reads

Blogs

A New Word: Foilsick

By

foilsick – adj. feeling ashamed after revealing a little too much of yourself to...

Accelerated Database Recovery for tempdb in SQL Server 2025

By

Accelerated database recovery was introduced in SQL Server 2019 and provides fast recovery, instantaneous...

Measuring What Matters: Operationalizing Data Trust for CDOs

By

Trust is the currency of the data economy. Without it, even the most advanced...

Read the latest Blogs

Forums

Create an HTML Report on the Status of SQL Server Agent Jobs

By Nisarg Upadhyay

Comments posted to this topic are about the item Create an HTML Report on...

ETL Framework In Production

By Rahulmsb5

Hello, I am leveraging Python within SQL Server Integration Services (SSIS) packages, primarily through...

SQL Server Ghosts

By Steve Jones - SSC Editor

Comments posted to this topic are about the item SQL Server Ghosts

Visit the forum

Question of the Day

SQL Server Ghosts

For Halloween, what are ghost records?

See possible answers