¼Ç¼һЩsqlÓï¾äoracleµÄ
select d.code,d.name, sum(w.weight) weight,round(avg(w.price),2) price,sum(w.money) money
from weight_info w left outer join t_dict d on w.productcode=d.code left outer join t_balancecode b on w.balancecode=b.balancecode where 1=1 and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', 'yyyy-mm-dd hh24:mi:ssxff') group by d.code ,d.name
select to_char(trunc(w.operdate,'mm'),'yyYY'), sum(w.weight),avg(w.price),sum(w.money)
from weight_info w left outer join t_dict d on w.productcode=d.code left outer join t_balancecode b on w.balancecode=b.balancecode
where 1=1 and d.code='100' and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', 'yyyy-mm-dd hh24:mi:ssxff') group by d.name,trunc(w.operdate,'mm') ;
Ïà¹ØÎĵµ£º
ORACLEѧϰÖгöÏÖµÄÎÊÌ⣨³ÖÐø¸üÐÂÖУ©
1¡¢ ORA:12545 ÒòÄ¿±êÖ÷»ú»ò¶ÔÏó²»´æÔÚ£¬Á¬½Óʧ°Ü
ÍøÉϲο¼µÄ½â¾ö°ì·¨
1.ËÑË÷ÄãµÄoracle°²×°Ä¿Â¼£¬ÕÒµ½ÕâÁ©¸öÎļþ tnsnames.ora ºÍ listener.ora ¼Çס¾Í¸ÄÕâÁ©¸öÎļþ¾ÍÐÐÁË£¬»¹ÓÐÒ»¸ö´óдµÄTNSNAMES.ORA²»ÓùÜËü¡£ËûÃǵÄ·¾¶ÈçÏ£ºÈç E:\oracle\ora92\n ......
µÇ½ORACLEʱ³öÏÖ£ºORA-12637 °ü½ÓÊÜʧ°Ü ´íÎó
½â¾ö·½·¨£ºÔÚ\oracle\product\10.2.0\client_1\NETWORK\ADMIN ÖÐÕÒµ½sqlnet.oraÎļþ£¬
°ÑÐÞ¸Ä SQLNET.AUTHENTICATION_SERVICES= (NONE)¾Í¿ÉÒÔÁË¡£ ......
--Ãû´Ê˵Ã÷£ºÔ´——±»Í¬²½µÄÊý¾Ý¿â
Ä¿µÄ——Ҫͬ²½µ½µÄÊý¾Ý¿â
Ç°6²½±ØÐëÖ´ÐÐ,µÚ6ÒÔºóÊÇһЩ¸¨ÖúÐÅÏ¢.
--1¡¢ÔÚÄ¿µÄÊý¾Ý¿âÉÏ£¬´´½¨dblink
drop public database link dblink_orc92_182;
Create public DATABASE LINK dbl ......
µÚÒ»¿Î£º¿Í»§¶Ë
1. Sql Plus(¿Í»§¶Ë£©£¬ÃüÁîÐÐÖ±½ÓÊäÈ룺sqlplus£¬È»ºó°´ÌáʾÊäÈëÓû§Ãû£¬ÃÜÂë¡£
2. ´Ó¿ªÊ¼³ÌÐòÔËÐÐ:sqlplus£¬ÊÇͼÐΰæµÄsqlplus.
3. http://localhost:5560/ ......
×î½ü¹«Ë¾´òËãÔÚÏÂÒ»´ú¼Æ·ÑϵͳÀïÃæʹÓÃÄÚ´æÊý¾Ý¿âµÄ¼¼Êõ£¬ËùÒÔ×÷Ϊ¹«Ë¾µÄÉè¼ÆÈËÔ±Ö®Ò»µÄÎÒ£¬ÔÚoracleÍøÉÏÏÂÁ˸öTimesTen£¬°²×°ÔÚÎÒÃǵIJâÊÔ·þÎñÆ÷ÉÏÃæaix5£¬Õâƪ¶ÌÎÄÖ÷ÒªÊÇÎÒ²Ù×÷Êý¾Ý¿âµÄÒ»¸ö±Ê¼Ç£¬ÏÂһƪ´òËã·¢Ò»¸öc³ÌÐòµÄÀý×ÓºÍÎÒ²âÊԵĽá¹û£¬ºóÐø¿ÉÄÜ»¹»áʹÓÃTimesTen cache of oracleÕâ¸ö²úÆ·£¬Â½ÐøÒ²»á·¢Ò»ÏÂÕâ· ......