Latest Additions on sql

Recompile all stored procedures, user-defined functions and views in the database

Posted 01 March 2011 - Category SQL Sub Category Database State

This script will recompile all stored procedures, user-defined functions and views in the database. This will refresh stored procedures execution plans stored in memory in order to reflect recent schema changes. Previous structures for instance in table functions can be held which will not represent new table structures correctly. So as a process it is good to run this when deploying new versions of the database.

Problem with creating an index on a large table causes timeout

Posted 30 June 2010 - Category SQL Sub Category Enterprise Manager

If you are performing a long processing operation such as creating an index on a large table, you may find that enterprise manager times out.

Change SQL Server bit field to the opposite value using ~

Posted 13 April 2010 - Category SQL Sub Category Language TSQL

In sql server you can flip the bit field value by using the ~ (tilde) operator

UDF to work out a date value from a string version held in different formats

Posted 24 March 2010 - Category SQL Sub Category Date And Time

A string version of date can be entered differently which makes the translation to a proper date type difficult. This function will do this for you.

Convert varchar uk date value to correct datetime value using 103 113 styles

Posted 23 March 2010 - Category SQL Sub Category Date And Time

This can prove annoying when the system assumes mm/dd/yyyy usa format as opposed to dd/mm/yyyy uk format.

Choose from the right hand menu to see full lists within subcategories