摘要: use Omniture select VLR.YearMonth ,VLR.VisitorID ,VLR.ConsultantID ,VLR.Visits ,CL.LevelID ,CL.[Status] ,IfNew = case when (VLR.YearMonth=startmont... 阅读全文
posted @ 2014-07-25 14:03 MonkeyFather 阅读(195) 评论(0) 推荐(0) 编辑
摘要: EXEC sp_configure 'show advanced options', 1; RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1; EXEC sp_configure 'show advanced options', 0; RECONFI... 阅读全文
posted @ 2014-07-25 14:01 MonkeyFather 阅读(420) 评论(0) 推荐(0) 编辑
摘要: update TableNameset ConsultantID=right(cast('1000000000'+CONVERT(int,ConsultantID) as varchar(10)),9) 阅读全文
posted @ 2014-07-25 14:00 MonkeyFather 阅读(258) 评论(0) 推荐(0) 编辑
摘要: --添加一条记录 INSERT INTO tableName(col1,col2,col3) VALUES (1,2,3) --添加多条记录 INSERT INTO tableName(col1,col2,col3) SELECT 3,4,5 UNION ALL ... 阅读全文
posted @ 2014-07-25 13:58 MonkeyFather 阅读(461) 评论(0) 推荐(0) 编辑
摘要: BULK INSERT DBName.TableName FROM 'FileRoute' WITH ( Fieldterminator=',' ,rowterminator='\n' ,FirstRow=1) 阅读全文
posted @ 2014-07-25 13:55 MonkeyFather 阅读(132) 评论(0) 推荐(0) 编辑