¡¾³õѧÕßÇó½Ì¡¿SQLServerµÄʱ¼äÓë³ÌÐòÖв»Ò»ÖÂ
loatÀàÐ͵Äֵת»¯ÎªÊ±¼äÊÇ—>
C# code:
DateTime dt = DateTime.fromOADate(40277.4927000525);
MessageBox.Show(dt.ToString());
MessageBoxÏÔʾµÄʱ¼äÊÇ—>2010-4-9 11:49:29
µ«ÊÇͬÑùµÄÊý×Ö£¨¼È40277.4927000525£©£¬Èç¹û´ÓÊý¾Ý¿âÖÐÈ¡³öÀ´ÏÔʾµÄdatagridviewÖУ¬¾Í»á±ÈÉÏÃæµÄʱ¼ä¶àÁ½Ìì¡£
C# code:
SqlDataAdapter da = new SqlDataAdapter("select [ID],cast([Time] as datetime) from DatapointValue2", con);
//×¢:40277.4927000525¾ÍÊÇTimeÁÐijһÐÐÖеÄÖµ
¾¶Ô±È£¬Í¬ÑùÊÇ40277.4927000525£¬gridviewÖÐÏÔʾµÄÊÇ—>2010-4-11 11:49:29£¬Ò²¾ÍÊDZÈÕæÊµµÄʱ¼ä¶àÁ½Ìì¡£
ÎÒÏÖÔÚÏë×öµÄÊÂÊÇÏëÈÃdataGridviewµÄʱ¼äÏÔʾÕý³££¬¿É·ñÔÚsqlÓï¾äÀïÃæÖ±½Ó¼ôµôÁ½Ì죬»òÕßÓñðµÄ·½·¨¡£Ï£Íû¸ßÊÖÖ¸µã£¡£¡£¡
Íò·Ö¸Ð¼¤£¡£¡£¡£¡£¡£¡
http://msdn.microsoft.com/zh-cn/library/ms186819.aspx
¸Ðл¿Õ¾ü£¬»ØÁË£¡£¡£¡£¡
»ØÁË£¡£¡£¡£¡—>»áÁË£¡£¡£¡£¡
Ïà¹ØÎÊ´ð£º
ÈçºÎ½«SqlServerÊý¾Ý¿âÖеÄÊý¾Ýµ¼Èëµ½ExcelÖУ¿
ÓÃsql server ×Ô´øµÄ¹¤¾ß
ÒýÓÃ
ÓÃsql server ×Ô´øµÄ¹¤¾ß
SQL²éѯ·ÖÎöÆ÷
DTSµ¼Èëµ¼³öÊý¾Ý
¿ÉÒÔÓÃSqlServer×Ô´øµÄ¹¤¾ß
ËùÓÐÈÎÎñ£µ¼³öÊý¾Ý¡£
ÄãÏÈÓòéÑ ......
ÒÔÏ´úÂëÊÇÌí¼ÓÊý¾Ý°´Å¥µÄ´úÂ룬Ïë°Ñtestid£¬ºÍtestnameÁ½¸ötxt´«µÝµ½Êý¾Ý¿âÖÐ
Êý¾Ý¿âÁ¬½Ó¿Ï¶¨Ã»ÎÊÌâ
¾ÍÊǺìÉ«²¿·ÖÀϱ¨´í
²»ÖªµÀΪʲô-£¬-
Çë¸÷λ¸ßÈ˰ïæ¿´¿´£¡
лл£¡
Java code:
private void new ......
1¡£ÔõÑùʹxp_cmdshellÄÜÍêÕûÊä³ö³¬¹ý255¸ö×Ö·ûµÄ×Ö·û´®¡£
2¡£select ʱ£¬¼ìË÷ËÙ¶ÈÊÇÓëfromºóµÄ TABLE˳ÐòÓйأ¬»¹ÊÇÓëwhereÌõ¼þµÄ˳ÐòÓйØ(TABLEÊý¾Ý¶àÉÙ )
ÔÚϵͳÊôÐÔÉ趨ÀïÓиöÑ¡Ïî,¿ÉÒÔÐ޸ĵ¥×Ö¶ÎÊä³ö×ÖÊýÏÞÖÆ. ......
ÎÒÔÚ±¾µØÓÃMicrsosoft sql server managementÁ¬½Ó·þÎñÆ÷ÉϵÄÊý¾Ý¿â¡£
ÎÒÏë°Ñ·þÎñÆ÷ÉϵÄÊý¾Ý¿â ±¸·Ýµ½ÎÒ±¾µØ¡£¿ÉÒÔÔõôҲ²»³É¹¦¡£
µÚÒ»ÖÖ·½·¨ÊÇÓÃsql£º
Backup Database test_database
To disk='C:\test_database ......
isnull(a,b)
¼´Èç¹ý×Ö¶ÎaΪnullÔò·µ»Øb
eg:
select isNUll(a,b) from table_1;
Ö±½Ó IFNULL¾ÍÐÐÁË¡£
SQL code:
mysql> select ifnull(null,2);
+----------------+
| ifnull(null,2) |
+------------ ......