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

SqlServer ÓαêÀý×Ó

 
Declare @Id int
Declare @Name varchar(20)
Declare Cur Cursor For Select Id,Name from T_User  
Open Cur
Fetch next from Cur Into @Id,@Name
While @@fetch_status=0    
Begin
    Update T_User Set [Name]=@Name,Id=@Id
    Fetch Next from Cur Into @Id,@Name
End  
Close Cur   
Deallocate Cur


Ïà¹ØÎĵµ£º

SQLServer 2005 ¼¯ÈºµÄÅäÖà ʵÏÖË«»úÈȱ¸

   MS Sqlserver 2005 ¼¯ÈºÊÇÖ¸Êý¾Ý¿â¸ß¿ÉÓÃÐÔ¼¯Èº£¬ÄÜʵÏÖͨ³£Ëù˵µÄ“Ë«»úÈȱ¸”£¬¼´µ±Ò»Ì¨·þÎñÆ÷Í£µôÊý¾Ý¿â·þÎñ¿ÉÒÔ×Ô¶¯×ªÒƵ½Áíһ̨·þÎñÆ÷¡£
       »·¾³ÒªÇó£º
       1¡¢windows 2003 serverÆóÒµ°æ
    &nb ......

SqlServer ʵÏÖÈÕÆÚ²»Í¬¸ñʽµÄת»»£¡£¡

select
convert(char(4),auth,120)+'Äê'+
substring(convert(char(10),auth,120),6,2)+'ÔÂ'+
substring(convert(char(10),auth,120),9,2)+'ÈÕ',
convert(char(4),appr,120)+'Äê'+
substring(convert(char(10),appr,120),6,2)+'ÔÂ'+
substring(convert(char(10),appr,120),9,2)+'ÈÕ'
from a

ÒÔÉÏ´úÂëʵÏֵĹ¦Ä ......

SQLServer»ñÈ¡ExcelÖÐËùÓÐSheet

EÅ̸ùĿ¼Ð½¨Ò»¸öExcelÎļþaa.xlsºó²âÊÔÈçÏ´úÂë
use tempdb
go
if (object_id ('udf_getExcelTableNames' ) is not null )
    drop function dbo .udf_getExcelTableNames
go
create function udf_getExcelTableNames (@filename varchar (1000 ))
returns @t table (id int , name varchar ( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ