sql2005 Á´½Ó·þÎñÆ÷ Á¬½ÓOracle...
Ò»¡¢½¨Á¢Á´½Ó·þÎñÆ÷
ÓÐÈËϲ»¶µ÷ÓÃϵͳ¹ý³ÌÀ´½¨Á¢£¬µ«ÎÒ¸öÈ˶Ôϵͳ¹ý³ÌûÓÐÌرðµÄѧϰ £¬ËùÒÔÓõÄÊǽçÃæÉèÖ㬵±È»ÓÐÐËȤҲ¿ÉÒÔÑо¿Ò»Ïµģ¬ÒòΪ¿ÉÒÔ°ÑSQLÖ´Ðе¼³öÀ´¡£
USE [master]
GO
EXEC master.dbo.sp_addlinkedserver @server = N'TEST2', @srvproduct=N'ORCL', @provider=N'OraOLEDB.Oracle', @datasrc=N'TEST2'
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'TEST2', @optname=N'use remote collation', @optvalue=N'true'
GO
USE [master]
GO
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'TEST2', @locallogin = N'sa', @useself = N'False', @rmtuser = N'IFSAPP', @rmtpassword = N'IFSAPP'
GO
USE [master]
GO
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'TEST2', @locallogin = NULL , @useself = N'False', @rmtuser = N'IFSAPP', @rmtpassword = N'IFSAPP'
GO
ÈçÉÏ£¬EXEC master.dbo.sp_addlinkedserver @server = N'TEST2', @srvproduct=N'ORCL', @provider=N'OraOLEDB.Oracle', @datasrc=N'TEST2' ÊÇÔÚϵͳÀィÁ¢Á´½Ó¡£
×¢Ò⣬Ҫ½¨Á¢Á´½Ó֮ǰ£¬ÒªÔÚSQLÊý¾Ý¿âËùÔÚ·þÎñÆ÷ÏÈ°²×°OracleµÄ¿Í»§¶Ë£¬²¢ÅäÖúÃOracleµÄʵÀýÁ¬½Ó¡£
@server = N'TEST2' Õâ¸öÊDzÎÊýÉ趨Á´½Ó·þÎñÆ÷Ãû³Æ¡£
&nbs
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
1 µ±Ê¹ÓÃgroup byʱ£¬Î´ÔÚgroup by ²¿·ÖÓõ½µÄ±íÁÐÔÚs e l e c t²¿·Ö³öÏÖʱ±ØÐëʹÓ÷Ö×麯Êý¡£
select last_name, state_cd, sum(sales) from customer group by last_name;
ERROR at line 1:
ORA-00979: not a GROUP BY expression.
state_cdÓ¦¸ÃʹÓ÷Ö×麯Êý£¬m a x ( )¡¢m i n ( )¡¢s u m ( )¡¢c o u n t ( )»òa v g ......
1¡¢INSTR4(string1,string2[,a][,b]) ·µ»Østring1Öаüº¬string2µÄλÖÃaºÍbÊÇÒÔUCS4´úÂëµãΪµ¥Î»¡£
ÒÔÉϺ¯Êý·µ»Østring1Öаüº¬string2µÄλÖᣴÓ×ó±ß¿ªÊ¼É¨Ãèstring1,ÆðʼλÖÃÊÇA¡£Èç¹ûAΪ¸ºÊýÄÇô´ÓÓұ߿ªÊ¼É¨Ãè¡£µÚB´Î³öÏÖµÄλÖý«±»·µ»Ø¡£AºÍBȱʡ¶¼Îª1£¬¼´·µ»ØÔÚ
string1ÖеÚÒ»´Î³öÏÖstring2µÄλÖá£Èç¹ûstring2ÔÚAº ......
TO_DATE¸ñʽ
Day:
dd number 12
dy abbreviated fri
day spelled out friday
ddspth spelled out, ordinal twelfth
Month:
mm number 03
mon abbreviated mar
month spelled out march
Year:
yy two digits 98  ......
µ±ORACLE ¹éµµÈÕÖ¾ÂúÁ˺󣬽«ÎÞ·¨Õý³£µÇÈëORACLE£¬ÐèҪɾ³ýÒ»²¿·Ö¹éµµÈÕÖ¾²ÅÄÜÕý³£µÇÈëORACLE¡£
Ò»¡¢Ê×ÏÈɾ³ý¹éµµÈÕÖ¾ÎïÀíÎļþ£¬¹éµµÈÕÖ¾Ò»°ã¶¼ÊÇλÓÚarchiveĿ¼Ï£¬AIXϵͳÏÂÎļþ¸ñʽΪ“1_17884_667758186.dbf”£¬½¨Òé²Ù×÷Ç°ÏȶÔÊý¾Ý¿â½øÐб¸·Ý£¬É¾³ýʱÖÁÉÙ±£Áô×î½ü¼¸ÌìµÄÈÕÖ¾ÓÃÓÚÊý¾Ý¿â»Ö¸´¡£
¶þ¡¢°Ñ¹éµµÈÕ ......