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

sqlServerÖг£¼ûµÄÈÕÆÚ¸ñʽ

½øÀ´ÒòΪ¿ª·¢Ô­Òò£¬¾­³£ÐèҪʹÓÃÈÕÆÚ·½ÃæµÄ±È½ÏºÍ²Ù×÷£¬ÕûÀíÁËÒ»ÏÂÕâ·½ÃæµÄ×ÊÁÏ£¬¹©´ó¼Ò¹²Ïí£º
SQL ServerÖÐÎÄ°æµÄĬÈϵÄÈÕÆÚ×Ö¶Îdatetime¸ñʽÊÇyyyy-mm-dd Thh:mm:ss.mmm
ÀýÈç:
select getdate()
2004-09-12 11:06:08.177
ÕûÀíÁËÒ»ÏÂSQL ServerÀïÃæ¿ÉÄܾ­³£»áÓõ½µÄÈÕÆÚ¸ñʽת»»·½·¨:
¾ÙÀýÈçÏÂ:
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
select CONVERT(varchar(12) , getdate(), 102 )
2004.09.12
select CONVERT(varchar(12) , getdate(), 101 )
09/12/2004
select CONVERT(varchar(12) , getdate(), 103 )
12/09/2004
select CONVERT(varchar(12) , getdate(), 104 )
12.09.2004
select CONVERT(varchar(12) , getdate(), 105 )
12-09-2004
select CONVERT(varchar(12) , getdate(), 106 )
12 09 2004
select CONVERT(varchar(12) , getdate(), 107 )
09 12, 2004
select CONVERT(varchar(12) , getdate(), 108 )
11:06:08
select CONVERT(varchar(12) , getdate(), 109 )
09 12 2004 1
select CONVERT(varchar(12) , getdate(), 110 )
09-12-2004
select CONVERT(varchar(12) , getdate(), 113 )
12 09 2004 1
select CONVERT(varchar(12) , getdate(), 114 )
11:06:08.177 
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/zhoufoxcn/archive/2007/10/09/1817279.aspx


Ïà¹ØÎĵµ£º

SQLServer ʹÓñ¸·Ý»¹Ô­Ôì³É¹ÂÁ¢Óû§µÄ½â¾ö

     ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬¾­³£»áÓöµ½Êý¾Ý¿âǨÒÆ»òÕßÊý¾ÝǨÒƵÄÎÊÌ⣬»òÕßÓÐͻȻµÄÊý¾Ý¿âË𻵣¬ÕâʱÐèÒª´ÓÊý¾Ý¿âµÄ±¸·ÝÖÐÖ±½Ó»Ö¸´¡£µ«ÊÇ£¬´Ëʱ»á³öÏÖÎÊÌ⣬ÕâÀï˵Ã÷¼¸ÖÖ³£¼ûÎÊÌâµÄ½â¾ö·½·¨¡£ 
¹ÂÁ¢Óû§µÄÎÊÌâ
        ±ÈÈ磬ÒÔÇ°µÄÊý¾Ý¿âµÄºÜ¶à ......

JAVA Á¬½Ó SQLServer 2000.

JAVA Á¬½Ó SQLServer 2000 ËùÐèÒªµÄÈý¸öJAR°ü¡£
http://download.csdn.net/source/2283940
----------------
Code:
------------------------
  Connection conn = null;
  Statement sta = null;
  try {
   Class.forName("com.microsoft.jdbc.sqlserver.SQLServer ......

mysqlÊý¾Ýµ¼³öµ½sqlserver·½·¨

ÕâÀïÊÇʹÓÃODBCÀ´×ª»»Êý¾Ý¿âµÄ¡£
1.°²×°mysqlÊý¾Ý¿âµÄODBCÇý¶¯£¬mysql¹ÙÍøÓÐÏÂÔØhttp://dev.mysql.com/downloads/connector/odbc/
2.´ò¿ª¿ØÖÆÃæ°å\¹ÜÀí¹¤¾ß\Êý¾ÝÔ´ODBC£¬ÔÚÓû§DSNÖÐÌí¼ÓÒ»¸öMySQL ODBC Êý¾ÝÔ´¡£
3.½Ó×ÅÔÚÏÂÃæµÄ´°ÌåÖÐÊäÈëÊý¾ÝÔ´Ãû³Æ£¬Èçmysqlodbc£»È»ºóÊäÈë·þÎñÆ÷ServerµØÖ·£¨localhost»òÆäËû£©£¬Óû§Us ......

ÓÃasp.net»¹Ô­Óë»Ö¸´sqlserverÊý¾Ý¿â

  
ÉÏ´Î×öÁ˸öÏîÄ¿£¬Éæ¼°µ½Êý¾Ý¿âµÄ»¹Ô­ºÍ»Ö¸´£¬µ½ÍøÉÏÕÒÁËһϣ¬ÊÇÀûÓÃSQLDMOʵÏֵģ¬Ö»ÒªÌí¼ÓSQLDMOÒýÓþͺÃÁË£¬È»ºóÀûÓÃϱߵÄÀàµÄ·½·¨¾Í¿ÉÒÔʵÏÖÁË¡£
ÎÒ°ÑÔ­×÷ÕßµÄÀàÀ©³äÁËһϣ¬¿ÉÒÔ×Ô¶¯Ê¶±ðweb.configÀï µÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®£¬¿ÉÒÔͨ¹ý±äÁ¿ÉèÖû¹Ô­»Ö¸´µÄÐÅÏ¢¡£
ÐèҪעÒâµÄʱ»¹Ô­£¬»¹Ô­µÄʱºòÎÊÌ ......

SQLSERVERÒÉÎÊ

ÒÉÎÊ£º
1£¬ sqlserverÀïÃæÖ´ÐÐ xp_cmdshell
exec @error=xp_cmdshell 'cmdstr......'
·µ»ØÖµÊÇʲôֵ£¿dosÃüÁîµÄ´íÎó£¿Ê²Ã´ÑùµÄ´íÎó¿ÉÒÔÆË×½µ½£¿
±ÈÈç:
DECLARE @error int
EXEC @error=master.dbo.xp_cmdshell 'bcp CM_DWHSend.dbo.WK_CM_DWHSend_Master in  "D:\Sales\DWH_Onl\2010042_SENDMEMM.csv" -n -t, - ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ