£¨×îгɹ¦£©Ãâ°²×°OracleÔËÐÐpl/sql developer
1.µ½http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/htdocs/winsoft.htmlÏÂÔØ
11.1.0.7.0 °æµÄ¼´Ê±¿Í»§¶Ë³ÌÐò°ü — Basic£¨²»ÊÇBasic Lite£©
2.½«ÏÂÔص½µÄÎļþ½âѹ£¬½âѹºóÎÒ½«Ä¿Â¼instantclient_11_1ÀïµÄÈ«²¿Îļþ¿½±´µ½ÁËÒ»¸öеÄĿ¼£ºE:\programs\OracleClient¡£ÄãÒ²¿ÉÒÔ²»¿½±´£¬Ö±½ÓʹÓýâѹºóµÄĿ¼Ãû¡£
3.´´½¨Îļþtnsnames.ora£¬ÄÚÈÝÈçÏ£º
APP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.22.22.6)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = app)
)
)
×¢£ºÐèÒª¸ü¸ÄµÄÊÇ£º1.°Ñ HOSTµÄÖµ172.22.22.6¸Ä³ÉÄãÒªÁ¬½ÓµÄÊý¾Ý¿âËùÔÚÖ÷»úµÄµØÖ·£»2.°ÑSERVICE_NAMEµÄÖµ¸Ä³ÉÄãҪʹÓõÄÔ¶³ÌÊý¾Ý¿âÃû
4.ÉèÖÃpl/sql DeveloperµÄperference¡£½«OracleµÄConnectionÀïµÄOracleÖ÷Ŀ¼ÉèÖÃΪÔÚµÚ2²½ÀïÉèÖõÄĿ¼£¬ÎÒµÄÊÇ£ºE:\programs\OracleClient£¬Í¬Ê±½«OCI¿âÉèÖÃΪE:\programs\OracleClient\oci.dll
5.ÉèÖû·¾³±äÁ¿¡£ÔÚϵͳ±äÁ¿pathÀï¼ÓÉÏE:\programs\OracleClient£»Ð½¨»·¾³±äÁ¿NLS_LANG£¬ÖµÎªAMERICAN_AMERICA.ZHS16GBK£»Ð½¨»·¾³±äÁ¿TNS_ADMIN£¬ÖµÎªE:\programs\OracleClient
6.ÖØÆôpl/sql developer, ÊäÈëÓû§ÃûÃÜÂ룬ÒÔ¼°µÚ3²½Àïnsnames.oraÉèÖõÄAPP
ÓÐÎÊÌâµÄ»°¿ÉÒÔÁªÏµÎÒ¡£
Ïà¹ØÎĵµ£º
create function dbo.F_Get_No
(
@No varchar(100)
)
RETURNS bigint
AS
BEGIN
WHILE PATINDEX('%[^0-9]%',@No)>0
BEGIN
SET @No=STUFF(@No,PATINDEX('%[^0-9]%',@No),1,'') --ɾµôÒ»¸ö·ÇÊý×ÖµÄ×Ö·û£¬Ñ»·½áÊø£¬Ê£ÓàµÄΪÊý×Ö²¿·Ö
END
RETURN CONVERT(bigint,@No ......
ÔÚÓйØÊý¾Ý¿âµÄÏîÄ¿¿ª·¢ÖУ¬±àÂ룬bugÐ޸ĵȵȣ¬¶¼ÐèÒª²é¿´²Ù×÷Ïà¹ØµÄSQLÎÄ£¬Èç¹ûSQLÎıȽϸ´ÔӵĻ°£¬ÎÒÃÇ×Ô¼ºÅÅ°æ·Ç³£Âé·³£¬Í¬Ê±Ò²ºÜ»¨·Ñʱ¼ä¡£¿ÉÄÜÓеĹ«Ë¾×Ô¼º¿ª·¢Á˸ñʽ»¯¹¤¾ß»òÕß¹ºÂòÁ˸ñʽ»¯¹¤¾ßÈí¼þ¡£ÓÐÁ˸ñʽ¹¤¾ßÎÒÃǾͽÚÊ¡ÁËÅÅ°æʱ¼ä¡£
½éÉÜÒ»ÏÂSQLinFormpro_Desktop£¨htt ......
ÎÞÂÛÄúÊÇһλ SQL µÄÐÂÊÖ£¬»òÊÇһλֻÊÇÐèÒª¶Ô SQL ¸´Ï°Ò»ÏµÄ×ÊÁϲִ¢Òµ½çÀϽ«£¬Äú¾ÍÀ´¶ÔµØ·½ÁË£¡
- SQL Ö¸Áî: SQL ÈçºÎ±»ÓÃÀ´´¢´æ¡¢¶ÁÈ¡¡¢ÒÔ¼°´¦ÀíÊý¾Ý¿âÖ®ÖеÄ×ÊÁÏ¡£
- ±í¸ñ´¦Àí: SQL ÈçºÎ±»ÓÃÀ´´¦ÀíÊý¾Ý¿âÖеıí¸ñ¡£
- SQLÓï·¨: ÕâÒ»Ò³ÁгöËùÓÐÔÚÕâ¸ö½Ì²ÄÖб»Ìáµ½µÄ SQL Óï·¨
SQL SELECT
Store_Information ±í¸ñ ......
Ò» sqlÓï¾äµÄÖ´Ðв½Öè
1£©Óï·¨·ÖÎö£¬·ÖÎöÓï¾äµÄÓï·¨ÊÇ·ñ·ûºÏ¹æ·¶£¬ºâÁ¿Óï¾äÖи÷±í´ïʽµÄÒâÒå¡£
2£© ÓïÒå·ÖÎö£¬¼ì²éÓï¾äÖÐÉæ¼°µÄËùÓÐÊý¾Ý¿â¶ÔÏóÊÇ·ñ´æÔÚ£¬ÇÒÓû§ÓÐÏàÓ¦µÄȨÏÞ¡£
3£©ÊÓͼת»»£¬½«Éæ¼°ÊÓͼµÄ²éѯÓï¾äת»»ÎªÏàÓ¦µÄ¶Ô»ù±í²éѯÓï¾ä¡£
4£©±í´ïʽת»»£¬ ½«¸´Ô SQL ±í´ïʽת»»Îª½Ï¼òµ¥µÄµÈЧÁ¬½Ó±í´ïʽ¡ ......
¼ÆËã¼ä¸ôʱ¼ä£º
select f_date,f_cstime,f_cetime, (((SYSDATE- TO_DATE(f_date||f_cstime,'YYYYMMDDHH24MISS')) * 86400000)-((SYSDATE- TO_DATE(f_date||f_cetime,'YYYYMMDDHH24MISS')) * 86400000))/1000 CURRENT_MILLI from ycsq_t_hauthlog where f_cstime<>'999999'
½«×Ö·û´®×ª»»³ÉÈÕÆÚÀà:SYSDATE- TO_ ......