摘要:1 ---sql server 2005 測試 塗聚文 捷為工作室,締友計算機信息技術有限公司 2 ---查找公曆節日 3 --select (@year-GooddayStaryear) as Gyear,GooddayContent from GoodDaysList where @year>=GooddayStaryear and GooddayStarmoth=@month and GooddayStardayorWeek=@week and GooddayWeekdays=@Day and GooddayUidKey='F0FAFC87-F492-455F-B56E-3
阅读全文
posted @ 2012-09-21 11:51
®Geovin Du Dream Park™
阅读(1045)评论(0)推荐(0)
摘要:1 ---数据来源:http://topic.csdn.net/u/20100424/07/29529d9d-bc54-4877-b198-4426b4d85024.html 2 if object_id('SolarData') is not null 3 drop table SolarData 4 go 5 create table SolarData 6 ( 7 yearid int not null, 8 data char(7) not null, 9 dataint int not null 10 ) 11 --插入数据 12 inse...
阅读全文
posted @ 2012-09-17 16:20
®Geovin Du Dream Park™
阅读(588)评论(0)推荐(0)
摘要:--時區時間 Local Time Zone Geovin Du 塗聚文--http://www.bigresource.com/MS_SQL-Converting-UTC-datetime-values-to-local-time-zones-XDKMI9sG.htmlSELECT GETUTCDATE()SELECT GETDATE()select CONVERT(varchar(100), GETUTCDATE(), 21)SELECT DATEDIFF(hh,'2008-05-20 20:08:01.020', '2008-05-20 16:08:01.020&
阅读全文
posted @ 2012-05-11 11:35
®Geovin Du Dream Park™
阅读(849)评论(0)推荐(0)
摘要:select EmployeesList.*,datediff(year,EmployeesList.EmployeeEnterDate,getdate()) as 'InJobTime' from EmployeesList---Geovin Du 塗聚文select EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate()) as 'InJobTime' from EmployeesListselect EmployeesList.*,datediff(month,Emp
阅读全文
posted @ 2012-04-24 19:14
®Geovin Du Dream Park™
阅读(613)评论(0)推荐(0)
摘要:--SQL server 2005 表中某一字段的所有值逗号分开的列表Geovin Du 塗聚文select * from Production.Productdeclare @names varchar(50)set @names=''select @names=@names+s.Name+' , 'from Production.Product sorder by s.Nameselect @namesgo--sql server 2000 如何逐条读出表中某一字段的所有值 Geovin Du 塗聚文declare @allstring varchar(80
阅读全文
posted @ 2011-07-08 08:37
®Geovin Du Dream Park™
阅读(418)评论(0)推荐(0)
摘要:SQL Server 2000 http://msdn.microsoft.com/en-us/library/Aa223952http://msdn.microsoft.com/en-us/library/aa902644(SQL.80).aspxhttp://msdn.microsoft.com/en-us/library/aa902644(SQL.80).aspx#intlfeaturesinsqlserver2000_usingadpformatSQL Server 2005 http://msdn.microsoft.com/zh-cn/library/ms188688(v=sql.
阅读全文
posted @ 2011-07-04 18:26
®Geovin Du Dream Park™
阅读(354)评论(0)推荐(0)