Monthly Archives: July 2009

sp_generate_inserts page 2

SET NOCOUNT ON –Making sure user only uses either @cols_to_include or @cols_to_exclude IF ((@cols_to_include IS NOT NULL) AND (@cols_to_exclude IS NOT NULL))     BEGIN         RAISERROR(‘Use either @cols_to_include or @cols_to_exclude. Do not use both the parameters at once’,16,1)     … Continue reading

Posted in Uncategorized | Leave a comment

sp_generate_inserts page 1

Tweaked for 2005 from http://vyaskn.tripod.com/code/generate_inserts.txt CREATE PROC sp_generate_inserts(    @table_name varchar(776),          — The table/view for which the INSERT statements will be generated using the existing data    @target_table varchar(776) = NULL,     — Use this parameter to specify a different … Continue reading

Posted in Uncategorized | Leave a comment

split db function

http://blog.krisvandermast.com/CategoryView,category,TSQL.aspx   IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_NAME = N’Split’ ) DROP FUNCTION Split GO CREATE FUNCTION dbo.Split ( @ItemList NVARCHAR(4000), @delimiter CHAR(1) ) RETURNS @IDTable TABLE (Item VARCHAR(50)) AS BEGIN DECLARE @tempItemList NVARCHAR(4000) SET @tempItemList = … Continue reading

Posted in Uncategorized | Leave a comment

C# Hidden Features

http://stackoverflow.com/questions/9033/hidden-features-of-c/14926

Posted in Uncategorized | Leave a comment