MSSQL 行转列
摘要:示例:原本是同一个学生的2条记录,把它行转列后:select studentnid ,max(case StudentSourceTypeNid when'1' then SourcePrimaryKey else '0' end) vipSourcePrimaryKey, max(case StudentSourceTypeNid when'1' then SourceDate else n...
阅读全文
posted @
2012-10-22 16:11
猪小娣
阅读(204)
推荐(0)
ASP.NET Request url 信息
摘要:在ASP.NET编程中经常需要用Request获取url的有关信息. 测试的url地址是http://www.test.com/testweb/default.aspxRequest.ApplicationPath:/testwebRequest.CurrentExecutionFilePath:/...
阅读全文
posted @
2012-10-22 11:33
猪小娣
阅读(186)
推荐(0)
存储过程还带游标的(练习练习)
摘要:很少很少写存储过程,不行,得练练手才行。----创建一个存储过程create procedure updateExchangeGiftCount_produ as begindeclare @materialsnids int ----定义你需要的变量declare @count int declare youbiao cursor for ----定义游标,取出你要的变量值select ig.materialsnid,sum(GiftsCount) as giftcountfrom dbo.IG_ExchangeHistory as ehinner join dbo.IG_Exchange.
阅读全文
posted @
2012-10-16 15:45
猪小娣
阅读(303)
推荐(0)