04 2012 档案
mssql FOR XML方法多行合并为一条数据
摘要:实验室表:LaboratoryRoom标签表:Tag关系表:Lab_Tagselect lab.Name,STUFF( ( SELECT ',' + isnull(TagName,'') FROM Tag WHERE Id in (select TagId from Lab_Tag where LabId = lab.Id) FOR XML PATH('') ), 1, 1, '') as tags from dbo.LaboratoryRoom as labstuff函数用于去掉多余的逗号stuff函数用法:select STU 阅读全文
posted @ 2012-04-25 21:14 阿蛆 阅读(458) 评论(0) 推荐(0)
sqlserver 插入多行数据
摘要:insert into t (f) select f1 union select f2 union select f3 多值插入select xxx into t2 from t1update t1 set xx = (select xx from t2 where id=t1.id) 阅读全文
posted @ 2012-04-21 00:38 阿蛆 阅读(867) 评论(0) 推荐(0)
调用系统存储过程清空所有表
摘要:调用系统存储过程清空所有表 EXECUTE sp_msforeachtable 'truncate table ?' 阅读全文
posted @ 2012-04-21 00:27 阿蛆 阅读(152) 评论(0) 推荐(0)
panel防闪
摘要:SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true); 阅读全文
posted @ 2012-04-17 14:26 阿蛆 阅读(127) 评论(1) 推荐(0)