To build function based index in SQL Server, you can use indexed view (materialized view) or using a computed column. In this script, I give an exmaple of how to use the computed column to implement a function based index on a table to search through a free formated telephone number column. The basic step […]
2007-04-10 (first published: 2007-03-29)
6,206 reads
In response to Sam Stange's "An old and new way to query Hierarchical data", this script uses the new CTE feature of SQL Server 2005 to display the hierarchical data all at once. I have added a check to prevent infinite loop in case there is a loop in the data (actually, there is one […]
2007-04-11 (first published: 2007-03-28)
1,410 reads
Case Insensitive Camparison remains a problem for most developers since SQL Server not supports any built in function for these purpose here is one wich compares varchar strings and returns 1 is mathes and 0 other wiseselect dbo.CampareCaseInsensitive('A','a')
2007-03-29 (first published: 2007-03-08)
77 reads
This script compares the code (SP, Func. etc.) between two databases (say Dev and QA) and reports the objects which have differences.
2009-02-26 (first published: 2007-03-08)
617 reads
Interested in getting the ordinal number as text?You know, 1st, 32nd and so on?Have a look at this script.peso@developerworkshop.net
2007-04-05 (first published: 2007-03-02)
184 reads
Here is a simple function to compare datepart of datetime fields , (no need to say ignores hour t,min,sec ... ) isDateMatch(@date1,@date2 ) retruns 1 if the datepart matches else returns 0regardsjohn
2007-03-21 (first published: 2007-02-24)
184 reads
First the SP_TABLECOMPARE was used from the site and all credit must go to the author (greate script). This script is for the creation of an audit trial. It is generic and can be used on any sql database. It deals with legasy naming conventions as well. The script creates the audit tables and triggers. […]
2007-03-13 (first published: 2007-02-15)
1,330 reads