Tag Archives: sql

SQL Server BULK INSERT Using a Data Field?

I have wondered for a while if there is a way to use SQL Server’s BULK INSERT command using BLOB or CLOB data Instead of a local file. The reason for this is that when writing imports, using both Coldfusion … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

MS SQL Server Time Dimension UDF

I use this function when writing reports. Use: SELECT time.Date , Count(tab.ID) AS [Count] FROM dbo.TimeDimension(’1/1/2007 00:00:00′, ’12/31/2007 23:59:59′, ‘month’, 1) time LEFT OUTER JOIN TempTable tab ON tab.DateCreated BETWEEN time.Date AND time.DateEnd Here is the function. I don’t know … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

MD5 Hash in SQL Server 2000 and 2005, 32 bit and 64 bit

SQL Server 2000 xp_MD5 at http://www.codeproject.com/database/xp_md5.asp Also works in SQL Server 2005 32 bit SQL Server 2005 DECLARE @Data varchar(MAX) SubString(master.dbo.fn_varbintohexstr(HashBytes(‘MD5′, @Data)), 3, 32) Works in SQL Server 2005 32 and 64 bit Solution found at http://www.codeproject.com/database/xp_md5.asp?df=100&forumid=32460&select=1519990#xx1519990xx

Posted in Uncategorized | Tagged | 1 Comment