This tool scripts out SQL Server 2000/2005 database objects to individual files in a manner which mimics Microsoft's Visual Studio for Database Professionals [aka, "Data Dude"]. These files can then be placed under proper source management control. An entire database is scripted in one call.Alternatively, it provides a way to simply document the contents of […]
2007-03-12 (first published: 2007-02-15)
2,258 reads
SQL 2005 user defined function to convert a string to proper case (title case).Flexible handling of delimiters and apostrophes to cater for words like "hasn't" and also names like "O'Reilly" and "d'Angelo".Mac and Mc surnames are handled generically, with some rules and exceptions which may need to be extended. Since McIntyre and Mcintyre are both […]
2007-03-14 (first published: 2007-02-14)
1,806 reads
CREATE FUNCTION [dbo].[GetDateTimeOfIsoWeek](@WeekYearNumber int, @DayNumber int)RETURNS datetime
2007-03-15 (first published: 2007-02-13)
118 reads
The first function is used to initialize the seed for the RC4 algorithm (second function), which does the encrypting/decrypting.
2007-08-29 (first published: 2007-02-12)
1,399 reads
There are many split-functions out there. This is very fast because there is only two string manipulation functions involved, and not per-part string manipulation.
2007-08-28 (first published: 2007-02-12)
476 reads
The ParseName function is very useful for getting parts out of a string of characters between delimiters. But a limitiation is that you only can get four parts out, and the function only accepts dots as delimiters.The function I have written below overcomes that limitations, and add a new feature to enable "from left" and […]
2007-08-27 (first published: 2007-02-12)
315 reads
I find myself refacoring an existing database which has some inefficient code, like cursors in stored procedures and triggers ...Wanting to figure out which objects contained this "poor" code, I made myself a little script to list all the objects which contain a search string.Just change the value that @search is set to and run […]
2007-03-01 (first published: 2007-02-07)
1,157 reads