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

Çë½Ìoracleµ¼³öµ½sql server2005

û¸É¹ýÕâÊ£¬Ò²²»ÖªµÀoracleÊý¾Ý¿âɶÑù£¬Çë½Ì´óϺÃǾßÌå²½ÖèÊÇʲô£¿ÐèҪעÒâЩʲô£¿
ÊÇÕû¸ö¿âµÄÊý¾Ý»¹ÊÇ±íµ¥?

Õæ¸öÊý¾Ý¿â

Õû¸öÊý¾Ý¿â£¬ÁíÍâÎÒÊÇ´Óһ̨װÓÐoracleµÄµçÄÔµ¼Èëµ½Áíһ̨װÓÐsql serverµÄµçÄÔÖС£¶àл£¡
ÒýÓÃ
ÊÇÕû¸ö¿âµÄÊý¾Ý»¹ÊÇ±íµ¥?



¸ÕgoogleÁËÏ£¬Ò²Ã»ÕÒµ½oracle µ¼ÈëSQL serverµÄ·½·¨,Ö»ÕÒµ½Á˸öSQL server ºÍ oraclµÄÁ¬½Ó£¬ Èç¹û¿ÉÒÔ£¬Á¬½ÓÉÏÁ˾ͿÉÒÔʹÓÃÁË£¬¾Í²»Óõ¼ÈëÁË°É. 

Â¥Ö÷¿ÉÒÔÊÔÊÔ..

ÒÔSQL Server 2000ΪÀý˵Ã÷SQL Serverµ½OracleÁ¬½Ó·þÎñÆ÷µÄ¾ßÌåʵÏÖ¹ý³Ì¡£

1.ÒªÇópc»úÉÏ°²×°oralce¿Í»§¶ËÈí¼þºÍsqlserver2000Èí¼þ¡£

2.¿Í»§¶ËµÄÅäÖÃtnsnames.oraÎļþ£¬ÅäÖÃËùÒªÁ¬½ÓµÄÊý¾Ý¿â·þÎñÆ÷£¨windows£¬unixµÈƽ̨¾ù¿ÉÒÔ£©

eg£ºtnsnames.ora

......

TEST =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.11.90)(PORT = 1521))

)

(CONNECT_DATA =

(sid = blue)

(SERVER = DEDICATED)

)

)

......

3.ÅäÖÃwindowsµÄODBCÊý¾ÝÔ´£º

¿ªÊ¼²Ëµ¥—¡·ÉèÖס·¹ÜÀí¹¤¾ß—¡·Êý¾ÝÔ´£¨ODBC£©—¡·½øÈëÅäÖÃÓû§DSN»òÕßϵͳDSN¾ù¿ÉÒÔ£ºÌí¼Ó—¡·Ñ¡ÔñMicrosoft ODBC for oracle—¡·×Ô¶¨ÒåÊý¾ÝÔ´Ãû³Æ£¨×îºÃ¸útnsÖÐÁ¬½Ó´®Í¬Ãû£¡£©—¡··þÎñÆ÷Ãû³Æ£¨±ØÌÌîдtnsÎļþÖеÄÁ¬½Ó´®Ãû³Æ£©—¡·Íê³É¡£



Ïà¹ØÎÊ´ð£º

asp.netÈçºÎÁ¬½ÓSQL SERVERÊý¾Ý¿â

ÎÒ°²×°SQL SERVER2008µÄʱºòÑ¡ÔñWINDOWSÉí·ÝÑéÖ¤Á¬½ÓµÄ£¬ÎÒ²»ÖªµÀÔõôдÁ¬½Ó¡£¡£¡£
»¹ÓÐÎÒÏë¸Ä³ÉSQL SERVERÉí·ÝÑéÖ¤Ôõô¸Ä£¿£¿
лл´ó¼ÒÁË£¡
XML code:

<configuration>
<appSettings>
& ......

sql ʱ¼äÎÊÌâ

sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001

ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......

sql ×Ö·û´®´¦ÀíÎÊÌâ À´ÕßÓзÖ


@s='S1,S2,S12,S23';

½«@sÀïÃæµÄS1,S2Ìæ»»³É´¦Àí£¬Î´´¦Àí


À´ÕßÓзÖ.

REPLACE(@s,'S1,S2','´¦Àí,δ´¦Àí')

REPLACE ²»ºÃÓà ×Ô¼ºÊÔÏÂ

SQL code:

declare @s ......

SQLÓï¾äÌáÎÊ

ÏÖÓÐ±í  Term
½á¹¹ÈçÏÂ

time1 time2 idterm
2009-2-15 2009-6-30 11
2009-9-10 2010-1-15 12

Èç¹ûÊäÈë 2009-4-25 ÔòÓ¦¸ÃÈ¡³öidterm 11
Èç¹ûÊäÈë 2009-12-5 ÔòÓ¦¸ÃÈ¡³öidterm 12 ......

sqlÊý¾Ý¸²¸Ç£¡

ÔõôʹÎÒÿ´Î²»ÊǸüÐÂÊý¾Ý¿â
¶øÊǸ²¸ÇÉϴεÄËùÓмǼÄØ£¡
ÒòΪÓÐʱºòʱ¼äÌõ¼þ²»Í¬
SQL code:

select * from hwouttb where
CAST(REPLACE(REPLACE(REPLACE(outdate,'Äê','-' ),'ÔÂ','-'),'ÈÕ','') AS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ