随笔 - 303  文章 - 0  评论 - 11  阅读 - 15万
09 2014 档案
动态拼接 sql的时候 里面 如果有变量的话 按上面的方式进行处理
摘要:set @Sql_Sql = N' select top 1 @m_zw=zw,@m_zh=temp from ket where zd=''ddd'' ' print @Sql_Sql EXEC sp_executesql... 阅读全文
posted @ 2014-09-26 16:45 雪原日暮 阅读(331) 评论(0) 推荐(0) 编辑
insert当 sql语句里面有变量 为字符类型的时候 要3个单引号
摘要:set @InsertStr='INSERT INTO [dbo].[T_SchoolPercentMonth]([SchoolID],[MonthOfYear],[PercentNum]) VALUES('''+cast(@SchoolID as nvarchar)+''','''+conver... 阅读全文
posted @ 2014-09-26 15:04 雪原日暮 阅读(534) 评论(0) 推荐(0) 编辑
如果 @s int 把它转成字符,可以这样 cast(@s as varchar)
摘要:如果@sint把它转成字符,可以这样cast(@sasvarchar) 阅读全文
posted @ 2014-09-26 14:42 雪原日暮 阅读(267) 评论(0) 推荐(0) 编辑
sql
摘要:if(@SchoolAbility=0 or @SchoolAbility is null)--不能让分母为0 begin set @SchoolAbility=1.00; end判断是否为null 的写法 不用等号 = 阅读全文
posted @ 2014-09-26 14:12 雪原日暮 阅读(120) 评论(0) 推荐(0) 编辑
HttpContext.Current
摘要:HttpContext. Response 直接这样写会报错 是因为 httpcontext没有提供response 这个静态的方法。通过这样写就可以ASP.NET还为它提供了一个静态属性HttpContext.Current来访问它 阅读全文
posted @ 2014-09-11 15:33 雪原日暮 阅读(190) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示