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

ÇÉÓÃSQL ServerÈÕÆÚÀàÐÍÊý¾Ý¶þ½øÖÆÊä³ö¼ÆËãʱ¼ä²î

1¡¢SQL ServerÈÕÆÚÊý¾Ý¿âÄÚ²¿±íʾ¼°²éѯÊä³ö£º
SQL ServerÄÚ²¿¶ÔDateTimeÀàÐ͵ıíʾÊÇÓÃ8¸ö×Ö½ÚÀ´±íʾ£¬ÆäÖÐÇ°4¸ö×Ö½Ú±íʾµÄÊýֵΪ×Ô1900Äê1ÔÂ1ÈÕÁãʱÒÔÀ´µÄÌìÊý£¬ºóËĸö×Ö½ÚÊÇÌìÊýÖ®ÍâµÄÓжàÉÙ¸ö1/300Ã룬ÕâҲ˵Ã÷SQL ServerÄÚ²¿±íʾʱ¼äµÄ¾«¶ÈΪ1/300Ã룬Լ3.3ºÁÃë¡£
³£¹æµÄSQL²éѯ£¬Õý³£ÈÕÆÚÊä³ö¸ñʽΪ:yyyy-MM-dd hh:mm:ss.SSS£¬ÕâÒ²ÊÇÖÐÎIJÙ×÷ϵͳµÄÈÕÆÚ¸ñʽ£¬¿ÉÒÔͨ¹ýÐ޸IJÙ×÷ϵͳÈÕÆÚ±í´ï¸ñʽÀ´Ó°ÏìSQL ServerȱʡµÄÈÕÆÚÊä³ö¸ñʽ¡£µ«ÊÇ£¬ÓÐЩʱºòȱʡµÄÈÕÆÚÊä³ö¸ñʽ²¢²»ÊÇÎÒÃÇÐèÒªµÄ£¬ÌرðÊÇ»ùÓÚʱ¼ä²îµÄÓ¦ÓÃÐèÇó¡£
2¡¢Ó¦ÓÃÐèÇó£º
»ùÓÚһϵÁÐʱ¼äµãµÄÊý¾Ý¼Ç¼·ÖÎö¡¢Í³¼ÆijÖÖ½á¹û¡£±ÈÈçGPS¶¨Î»É豸°´Ò»¶¨Ê±¼ä¼ä¸ô»Ø´«Î»ÖÃÊý¾Ý²¢¼Ç¼µ½Êý¾Ý¿âÖУ¬Êý¾Ý°üÀ¨¾­Î³¶È¡¢Ê±¼ä¡¢Ëٶȵȣ¬ÏÖÔÚÐèÒª»ùÓÚÕâЩ»Ø´«Êý¾Ýͳ¼ÆÊÇ·ñÔÚijµØÓÐÍ£Áô£¬Í£Áôʱ¼ä¡¢¿ªÊ¼Ê±¼ä¡¢½áÊøʱ¼ä¡£Í£Áô±êÖ¾ÊÇËÙ¶ÈΪ0¡£ÏÔʾ£¬ÕâÐèÒª¸ù¾ÝÊý¾Ý¼Ç¼֮¼äµÄ²îÖµ×öͳ¼Æ¼ÆËã¡£
3¡¢ÊʺÏÐèÇóµÄÊä³ö¼°×ª»»¡¢´¦Àí£º
Èç¹û°´ÕÕȱʡµÄSQL ServerÈÕÆÚÊä³ö¸ñʽ£¬Êä³öÄÚÈÝ¿ÉÓ³ÉäΪ±à³ÌÓïÑÔÏà¹ØµÄÊý¾ÝÀàÐÍ£¬ÈçJava¿ÉÒÔÊÇString¡¢Date£¬×ªÎªÎªDateÓÐÒ»¶¨Í³¼ÆÊý¾ÝÁ¿µÄ»°£¬Õâ¸öת»»±¾Éí¾ÍÊǵÍЧºÍºÄʱµÄ£¬Êµ¼Ê¹ý³Ì¿ÉÄÜÊÇÏÈ´ÓSQL ServerÄÚ²¿±íʾת»»Îªyyyy-MM-dd hh:mm:ss.SSS×Ö·û´®£¬ÔÙ´ÓÕâ¸ö×Ö·û´®×ª»»ÎªDate£»×÷ΪStringʹÓÃÒ²ÐèҪת»»ÎªDateÖ®ºó²Å¿ÉÒÔ×öʱ¼ä²îÔËË㣬ͬÑùµÍЧ¡£
SQL ServerÄÚ²¿Êý¾Ý±íʾ¸ñʽÆäʵÒѾ­Êʺϱí´ïʱ¼ä²îÁË£¬ÊDz»ÊÇÄÜÖ±½ÓÀûÓá£SQL ServerÓÐcastº¯Êý£¬¿ÉÒÔ½«ÈÕÆÚÊä³öΪ¶þ½øÖÆÊý¾Ý¡£È磺
select longi, lati, speed, cast(gpsDate as binary(8)) as gpsDate from loc_history
ºóÐø´¦Àí´úÂëƬ¶ÎΪ£º
float lon = rs.getFloat("longi");
float lat = rs.getFloat("lati");
byte time[] = rs.getBytes("gpsDate");
»ñµÃ¾­Î³¶È¡¢Ê±¼ä¶þ½øÖƱíʾ
int days = ((time[0] & 0x00ff) << 24) + ((time[1] & 0x00ff) << 16)
                    + ((time[2] & 0x00ff) << 8) + (time[3] & 0x00ff);
int seconds = ((time[4] & 0x00ff) << 24) + ((time[5] & 0x00ff) << 16)
                    + ((time[6] & 0x00f


Ïà¹ØÎĵµ£º

sqlÐÔÄÜÓÅ»¯

1.²éѯµÄÄ£ºýÆ¥Åä
¾¡Á¿±ÜÃâÔÚÒ»¸ö¸´ÔÓ²éѯÀïÃæʹÓà LIKE '%parm1%'—— ºìÉ«±êʶλÖõİٷֺŻᵼÖÂÏà¹ØÁеÄË÷ÒýÎÞ·¨Ê¹Óã¬×îºÃ²»ÒªÓÃ.
½â¾ö°ì·¨:
ÆäʵֻÐèÒª¶Ô¸Ã½Å±¾ÂÔ×ö¸Ä½ø£¬²éѯËٶȱã»áÌá¸ß½ü°Ù±¶¡£¸Ä½ø·½·¨ÈçÏ£º
a¡¢ÐÞ¸Äǰ̨³ÌÐò——°Ñ²éѯÌõ¼þµÄ¹©Ó¦ÉÌÃû³ÆÒ»À¸ÓÉÔ­À´µÄÎı¾ÊäÈë¸ÄΪÏÂÀ­Áб ......

SQL ServerÖ®×é¼þ»®·Ö

      ´Ó²»Í¬µÄ½Ç¶È£¬ÎÒÃÇ¿ÉÒÔ°ÑSQL ServerÊý¾Ýƽ̨»®·ÖΪ¶à¸ö×é¼þ¡£ÎÒÃÇÏÂÃæ°´ÕÕSQL Server Internal Teamͨ³£µÄ»®·ÖÔ­Ôò£¬°ÑSQL ServerÊý¾Ýƽ̨»®·ÖΪÈçÏ£º
SSAS: SQL Server Analysis Service¡£Ö÷ÒªÓÃÀ´×ö·ÖÎöÓ㬱ÈÈçCube£¬¿ÉÒÔ´Ó²»Í¬µÄ½Ç¶ÈÉóÊÓÊý¾Ý¡£
SSIS: SQL Server Integration Servi ......

¼à¿ØÊý¾Ý¿âÐÔÄܵÄSQL»ã×Ü

¼à¿ØÊý¾Ý¿âÐÔÄܵÄSQL»ã×Ü ¡¾http://hi.baidu.com/g%5Fliying/blog/item/89711cfc27b82ff4fc037f80.html¡¿
1. ¼à¿ØÊÂÀýµÄµÈ´ý
select event,sum(decode(wait_Time,0,0,1)) "Prev",
sum(decode(wait_Time,0,1,0)) "Curr",count(*) "Tot"
from v$session_Wait
group by event order by 4;
2. »Ø¹ö¶ÎµÄÕùÓÃÇé¿ö
se ......

ORACLE sqlÓï¾ä±Ê¼Ç

windowsÉÏ´æÔÚ32bitµÄÏÞÖÆ£¬ÈçAIX¡¢HP UNIX µÈÓÐÃ÷È·µÄ64BIT OS and ORACLEµÄ°æ±¾£¬32bit oracle¿ÉÒÔ×°ÔÚ64bit os ÉÏ£¬64 bit oracle²»ÄÜ×°ÔÚ32 bit OSÉÏ
oracleÊÇ64bit or 32 bit,32bit ͨ³£ SGAÓÐ 1.7G µÄÏÞÖÆ(ijЩOSµÄ´¦Àí»òÕßWINDOWSÉÏÓÐÌض¨É趨¿ÉÒÔÖ§³Öµ½2GÒÔÉÏÉõÖÁ´ïµ½3.7G
ÈçºÎ²é³öǰ̨ÕýÔÚ·¢³öµÄsqlÓï¾ä:
sele ......

SQL Server BI Step by Step SSIS 7 (End)

ºÍÆäËü³ÌÐòÒ»Ñù£¬SSIS°üͬÑùÐèÒª½¡×³£¬Îȶ¨µÄÔËÐУ¬ÕâÑùµÄ³ÌÐò²ÅÓпɿ¿ÐԺͿÉÉìËõÐÔ¡£SSISÌṩÁËÈçÏ·½ÃæµÄÖ§³Ö:
        1.ÊÂÎñ: ¿ÉÒÔ¶ÔÒ»¸ö³ÌÐò°üÉèÖóÉÒ»¸ö»òÕ߶à¸öÊÂÎñ£¬ÉõÖÁ¿ÉÒÔ¶ÔÁ½¸ö³ÌÐò°üÉèÖóÉÒ»¸öÊÂÎñ¡£ÎªÁ˱£Ö¤Êý¾ÝµÄÒ»ÖÂÐÔ£¬Ä㻹¿ÉÒÔDTCÊÂÎñ»òÕßSQL ServerÒýÇ漶µÄÊÂÎñ¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ