Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLÈÕÀú±íÊý¾ÝµÄ¼òµ¥Éú³É

ΪÁ˹«Ë¾¿¼ÇÚϵͳµÄÐèÒª
±àдµÄ¼¸¸ö¼òµ¥´æ´¢¹ý³Ì(¿ÉÒÔÊÖ¶¯ÔËÐÐ,Ò²¿ÉÒÔÉèÖÃÊÂÎñ×Ô¶¯ÔËÐÐ!¸Ð¾õ»¹ÐбȽÏͨÓÃ,д³öÀ´¹²ÏíÏÂ)
Calendar±í½á¹¹ºÜ¼òµ¥,2¸ö×Ö¶Î:
fdDate ÈÕÆÚ
fdType ¿¼ÇÚÀàÐÍ(¹¤×÷ÈÕN,ÖÜÄ©W,½Ú¼ÙÈÕH[ÐèÒª¸ù¾ÝÐèÒª×Ô¼ºÐÞ¸Ä])
--ÅжÏÒ»¶Îʱ¼ä·¶Î§ÄڵŤ×÷ÈÕ£¨N£©ºÍÖÜÄ©£¨W£©
Create     PROCEDURE [dbo].[NewMonthWeekDay_Calendar]
@sdate smalldatetime,
@edate smalldatetime
AS
declare @fdDate smalldatetime
declare @WeekDay varchar(20)
declare cr0 cursor for
 select fdDate from calendar where fddate>=@sdate and fddate<=@edate
open cr0
fetch next from cr0 into @fdDate
 while @@fetch_status=0
 begin
  if (datename(weekday,@fdDate)='ÐÇÆÚÒ»')
   update calendar set fdType='N' where fdDate=@fdDate
  if (datename(weekday,@fdDate)='ÐÇÆÚ¶þ')
   update calendar set fdType='N' where fdDate=@fdDate
  if (datename(weekday,@fdDate)='ÐÇÆÚÈý')
   update calendar set fdType='N' where fdDate=@fdDate
  if (datename(weekday,@fdDate)='ÐÇÆÚËÄ')
   update calendar set fdType='N' where fdDate=@fdDate
  if (datename(weekday,@fdDate)='ÐÇÆÚÎå')
   update calendar set fdType='N' where fdDate=@fdDate
  if (datename(weekday,@fdDate)='ÐÇÆÚÁù')
   update calendar set fdType='W' where fdDate=@fdDate
  if (datename(weekday,@fdDate)='ÐÇÆÚÈÕ')
   update calendar set fdType='W' where fdDate=@fdDate
  
  fetch next from cr0 into @fdDate
 end
close cr0
deallocate cr0 
--¸ù¾ÝÄêºÍÔÂ×Ô¶¯²åÈëCalendar±íÐÂÈÕÆÚÊý¾Ý
Create    PROCEDURE [dbo].[NewMonth_Calendar]
@Year int,
@Month int
AS
 Select TOP 50 ID = Identity(Int, 0, 1) Into #T from SysColumns
 insert into cas..calendar(fdDate)
 Select Convert(Varchar(10), DateAdd(dd, ID, Cast(Rtrim(@Year) + '-' + Rtrim(@Month) + '-' + '01' As DateTime)), 120) from #T
 W


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

SQLʱ¼äº¯Êý

--ÈÕÆÚת»»²ÎÊý,ÖµµÃÊÕ²Ø
select CONVERT(varchar, getdate(), 120 )2004-09-12 11:06:08
select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')20040912110608
select CONVERT(varchar(12) , getdate(), 111 )2004/09/12
select CONVERT(varchar(12) , getdate(), 112 )20040912 ......

MS SQL 2005Á´½Ó·þÎñÆ÷Á¬½ÓÔ¶³ÌORACLEÈ«¹ý³Ì

µÚÒ»²½:ÏÂÔØ°²×°Oracle 10g Release 2 ¿Í»§¶ËÈí¼þ,ÏÂÔØÁ¬½ÓÊÇ:
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
ÏÂÔغó°²×°
 
 
 
µÚ¶þ²½:ÏÂÔØ°²×°Oracle ODAC,ÏÂÔØÁ¬½ÓÊÇ:
http://download.oracle.com/otn/other/ole-oo4o/ODAC1020221.exe
 
µÚÈý²½: ÖØÆôMS SQ ......

ÔÚ°²×°SQL Server2005 ÎÊÌâÐÅÏ¢£º

"SQL Server °²×°³ÌÐòÎÞ·¨»ñÈ¡ ASPNET ÕÊ»§µÄϵͳÕÊ»§ÐÅÏ¢"
½â¾ö°ì·¨£º
ÓÃaspnet_regiisʵÓù¤¾ßжÔغÍÖØа²×°Ò»Ï¾ͿÉÒÔÁË¡£
¾ßÌåµÄ²Ù×÷£º
1¡¢½øÈëCMD£º
C:\windows\microsoft.net\framework\v2.0.50727Îļþ¼ÐÏ£¬ÔËÐÐaspnet_regiis -uжÔØ
È»ºóÔËÐÐaspnet_regiis -i ÖØа²×°£¬ÉÏÊöÎÊÌâ¼´¿É½â¾ö¡£
2¡¢C:\WINDOWS\ ......

SqlÈÕÖ¾ÇåÀí

ÈÕÖ¾ÎļþÂú¶øÔì³ÉSQLÊý¾Ý¿âÎÞ·¨Ð´ÈëÎļþʱ£¬¿ÉÓÃÁ½ÖÖ·½·¨£º
¡¡¡¡Ò»ÖÖ·½·¨£ºÇå¿ÕÈÕÖ¾¡£
¡¡¡¡1£®´ò¿ª²éѯ·ÖÎöÆ÷£¬ÊäÈëÃüÁî
¡¡¡¡DUMP TRANSACTION Êý¾Ý¿âÃû WITH NO_LOG
¡¡¡¡2.ÔÙ´ò¿ªÆóÒµ¹ÜÀíÆ÷--ÓÒ¼üÄãҪѹËõµÄÊý¾Ý¿â--ËùÓÐÈÎÎñ--ÊÕËõÊý¾Ý¿â--ÊÕËõÎļþ--Ñ¡ÔñÈÕÖ¾Îļþ--ÔÚÊÕËõ·½Ê½ÀïÑ¡ÔñÊÕËõÖÁXXM,ÕâÀï»á¸ø³öÒ»¸öÔÊÐíÊÕËõµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ