摘要: SQL语句截取时间,只显示年月日(2004-09-12) select CONVERT(varchar, 字段名, 120 ) eg:select convert(varchar(11),vc_createdate,120) '日期' from table 扩展:其他格式 select CONVER 阅读全文
posted @ 2020-03-25 17:50 龙族少年 阅读(171) 评论(0) 推荐(0) 编辑
摘要: SET @I = '12-办公室'SELECT SUBSTRING(@I,CHARINDEX('-',@I) + 1,LEN(@I) - CHARINDEX('-',@I)) 结果:办公室 declare @str nvarchar(50);set @str='462,464,2';select @ 阅读全文
posted @ 2020-03-25 17:48 龙族少年 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 给windows全局变量-path,添加"F:\oralce\product\12.2.0\client_1\bin"。 注:盘符为你安装Oracle客户端的地址 阅读全文
posted @ 2020-03-25 17:47 龙族少年 阅读(2426) 评论(0) 推荐(0) 编辑
摘要: @Html.Raw()的作用 @Html.Raw() 方法输出带有html标签的字符串,如:@Html.Raw("<div style='color:red'>红字</div>")结果:红字 如果不用,则会输出:<div style='color:red'>红字</div> 阅读全文
posted @ 2020-03-25 17:46 龙族少年 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 在写LINQ语句的时候,往往会看到.AsEnumerable() 和 .AsQueryable() 。例如: string strcon = "Data Source=.\\SQLEXPRESS;Initial Catalog=Db_Example;Persist Security Info=Tru 阅读全文
posted @ 2020-03-25 17:45 龙族少年 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1、设置Gridview控件的某列是否可编辑(CUser:数据库字段) this.gdv.Columns["CUser"].OptionsColumn.AllowEdit = false; 2、设置Gridview控件整体不可编辑 或者this.gdv.OptionsBehavior.Editabl 阅读全文
posted @ 2020-03-25 17:43 龙族少年 阅读(540) 评论(0) 推荐(0) 编辑
摘要: string str="2";str.PadLeft(4, '0'); //结果为为 '0002'; string str="2";str.PadRight(4, '0'); //结果为为 '2000'; 阅读全文
posted @ 2020-03-25 17:42 龙族少年 阅读(380) 评论(0) 推荐(0) 编辑