This function will return you the month-end date. Input parameter may be any date of that month for which you want to calculate month-end.Example:Input: '2-20-2004' Output: '2-29-2004'Input: '2-15-2004' Output: '2-29-2004'Input: '3-20-2004' Output: '3-31-2004'Input: '3-30-2004' Output: '3-31-2004'
2007-05-08 (first published: 2007-04-19)
1,316 reads
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)
8,764 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,431 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)
81 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)
623 reads