Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts by Benson Sibanda

SQLServerCentral.com profile

   Items 1 to 4 of 4   
 

String Character Count

A while ago I once attended an interview where I was asked to write a short script that counts each letter of a given string.   Read more...
By Benson Sibanda 2013/04/25 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 1,479 reads

The joy of sp_spaceused

This script uses a cursor to loop through all tables and get the count and table sizes using sp_spaceused. It is much faster and efficient than use 'SELECT COUNT(*) FROM TABLE_NAME'.  Read more...
By Benson Sibanda 2012/06/22 | Source: SQLServerCentral.com | Category: sp_spaceused
Rating: |  Discuss |   Briefcase | 1,875 reads

Script to Search Through all Databases for a Table Name

This script will search the entire server and give the name and schema of the database where the table exists.  Read more...
By Benson Sibanda 2012/06/25 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 1,390 reads

Variable Grouping Using a Case Statement

The code below uses a CASE STATEMENT to group sales data based on date,week,month and quarter. It should be executed in AdventureWorks 2005 or 2008.  Read more...
By Benson Sibanda 2012/05/30 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 1,920 reads
   Items 1 to 4 of 4