董晓涛(David Dong)

博客园 首页 新随笔 联系 订阅 管理

2005年6月29日 #

摘要: Encrypting Data With the SQL Server Encrypt Function A common question I'm asked by clients is how to encrypt data and store it in SQL Server. One of the major problems I see in the field is when peop... 阅读全文
posted @ 2005-06-29 20:09 董晓涛 阅读(1014) 评论(2) 推荐(0) 编辑

摘要: -- This script converts string-based IP addresses to their numericequivalents so that it is easy to do arithmatic on them such as find anIP address that is within a range.-- -- NOTE: This function cal... 阅读全文
posted @ 2005-06-29 12:24 董晓涛 阅读(629) 评论(0) 推荐(0) 编辑

摘要: -- ----exec Up_ExportTables 'Customers'-- When you want to export a table structure to T-SQL, everyone alwayspoints you to Enterprise Manager, or a script that calls BCP.-- Sometimes, a developer eith... 阅读全文
posted @ 2005-06-29 12:21 董晓涛 阅读(631) 评论(0) 推荐(0) 编辑

摘要: CREATE TABLE [dbo].[DateDim] ( [DateKey] [int] IDENTITY (1, 1) NOT NULL , [ActualDate] [datetime] NOT NULL , [Year] [int] NOT NULL , [Quarter] [int] NOT NULL , [Month] [int] NOT NULL , [Week] [int] NO... 阅读全文
posted @ 2005-06-29 12:17 董晓涛 阅读(546) 评论(0) 推荐(0) 编辑

摘要: SET NOCOUNT ONGOuse pubs; --EXEC sp_generate_inserts 'David01' ,@from="from David01 where A='a1'"PRINT 'Using Master database'USE masterGOPRINT 'Checking for the existence of this procedure'IF (SELE... 阅读全文
posted @ 2005-06-29 12:16 董晓涛 阅读(961) 评论(0) 推荐(0) 编辑

摘要: /* ***** This entire comment portion is not necessarily part of SP, just notes on subject ***** The purpose of this SP is to provide a method in T-SQL to launch another T-SQL thread without havin... 阅读全文
posted @ 2005-06-29 12:03 董晓涛 阅读(798) 评论(0) 推荐(0) 编辑

摘要: Don't Use Select * Something you see in a lot of database access code is a select statement that looks something like this: SELECT * FROM TableName WHERE ... While there's technicall... 阅读全文
posted @ 2005-06-29 11:56 董晓涛 阅读(335) 评论(0) 推荐(0) 编辑