上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 经常会用到,一直没留底,今天找了一段来,以供参考sql server2000中使用convert来取得datetime数据类型样式(全)日期数据格式的处理,两个示例:CONVERT(varchar(16), 时间一, 20) 结果:2007-02-01 08:02/*时间一般为getdate()函数或数据表里的字段*/CONVERT(varchar(10), 时间一, 23) 结果:2007-02-01 /*varchar(10)表示日期输出的格式,如果不够长会发生截取*/语句及查询结果:Select CONVERT(varchar(100), GETDATE(), 0): 05 16 200 阅读全文
posted @ 2012-07-15 17:28 叮/当 阅读(337) 评论(1) 推荐(0) 编辑
摘要: Math.ceil(),ceil() 方法可对一个数进行上舍入。 参数必须是一个数值。返回值大于等于 x,并且与它最接近的整数。Math.floor(),floor() 方法可对一个数进行下舍入。 参数可以是任意数值或表达式。返回值小于等于 x,且与 x 最接近的整数。Math.round(),round() 方法可把一个数字舍入为最接近的整数 参数必须是一个数值。返回值与 x 最接近的整数。接近于四舍五入 阅读全文
posted @ 2012-07-05 09:00 叮/当 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 转自:http://blog.csdn.net/dinglang_2009/article/details/6951138using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Collections;using System.Reflection;namespace DatableToList{ class ConvertHelper<T> where T : new() { /// <summar... 阅读全文
posted @ 2012-06-18 18:04 叮/当 阅读(790) 评论(3) 推荐(1) 编辑
摘要: Declare @Oid int Declare @PriceTotal float--定义游标Declare cur cursor forSelect Oid from orders where oid in (select oid from ochild where Ochild.MID = @ProductSN) And Orders.PID = @SupplierSN And (Orders.LastDate >= @StartDate) And (Orders.LastDate <= @EndDate)--打开游标open cur--植入变量fetch ... 阅读全文
posted @ 2012-06-07 16:58 叮/当 阅读(252) 评论(0) 推荐(0) 编辑
摘要: public int GetHashCode(string s) { int hash = 5381; int len = s.Length; for (int i = 0; i < len; i++) { int c = Convert.ToInt32(s[i]); hash = ((hash << 5) + hash) ^ c; } return hash; } 阅读全文
posted @ 2012-06-04 11:26 叮/当 阅读(318) 评论(1) 推荐(1) 编辑
摘要: Create proc killspid (@dbname varchar(20)) as begin declare @sql nvarchar(500) declare @spid int--SPID 值是当用户进行连接时指派给该连接的一个唯一的整数 set @sql= 'declare getspid cursor for select spid from sysprocesses where dbid=db_id( '''+@dbname+ ''') ' --sysprocesses 包含有关 SQL ... 阅读全文
posted @ 2012-06-02 15:30 叮/当 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 开始测试是在两条win2003 网络负载均衡环境里,没有成功,后重新建纯净环境再次测试,成功,不罗嗦,看下面叙述.1,环境:虚拟机机2台,WIN2003 SP2 ,SQL2005 sp4 企业版,2台系统基本设置分别为:A机:计算机名: tg-sqlcopy-1IP:192.168.1.167SQL实例:SQL200501B机:计算机名: tg-sqlcopy-2IP:192.168.1.168SQL实例:SQL2005022,环境配置(在A.B机中做同样设置):新建管理员账号并设置密码:sqlcopy ;在服务里设置‘SQL代理’--此账号,选择刚刚新建的‘sqlcopy ’账号,并设置’S 阅读全文
posted @ 2012-03-21 19:05 叮/当 阅读(1836) 评论(0) 推荐(1) 编辑
摘要: using System.Xml; //初始化一个xml实例 XmlDocument xml=new XmlDocument(); //导入指定xml文件 xml.Load(path); xml.Load(HttpContext.Current.Server.MapPath("~/file/bookstore.xml")); //指定一个节点 ... 阅读全文
posted @ 2012-03-09 17:36 叮/当 阅读(763) 评论(0) 推荐(0) 编辑
摘要: StringDictionary:默认key不区分大小写 NameValueCollection:默认key区分大小写 KeyedCollection:不是键值对容器,但是比键值对容器更好用,强烈推荐命名空间using System.Collections.SpecializedSystem.Collections 命名空间包含接口和类,这些接口和类定义各种对象(如列表、队列、位数组、哈希表和字典)的集合。 System.Collections.Generic 命名空间包含定义泛型集合的接口和类,泛型集合允许用户创建强类型集合,它能提供比非泛型强类型集合更好的类型安全性和性能。 ... 阅读全文
posted @ 2012-03-03 18:17 叮/当 阅读(4480) 评论(0) 推荐(0) 编辑
摘要: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61231.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 系统找不到指定的文件 解决方案一: 1、如果你的程序运行在你能控制的服务器上,那么安... 阅读全文
posted @ 2012-02-25 15:42 叮/当 阅读(512) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页