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

Oracle´æ´¢¹ý³Ì£¬ÒÔÓαêµÄ·½Ê½·µ»ØÒ»¸ö¼Ç¼¼¯


--´´½¨Ò»¸ö°ü
create or replace package types
as
type cursorType is ref cursor;
end types;
--´´½¨´æ´¢¹ý³Ì,ÓαêÀàÐÍ·µ»Ø²ÎÊý
create or replace procedure SP_Fee_Instance(v_company in varchar, v_sdate in nvarchar2, v_edate in nvarchar2,p_cursor in out types.cursorType) is
-- vs_sql   varchar2(2000);
--company    varchar2(100);  --¹«Ë¾±àÂë
--start_date varchar2(10);   --¼Æ»®¸¶¿îʱ¼ä¶Î[Æð]
--end_date   varchar2(10);   --¼Æ»®¸¶¿îʱ¼ä¶Î[Ö¹]
begin
IF NVL(v_company,' ') <> ' ' THEN
     OPEN p_cursor FOR
        select a.company,a.pact_name,a.pact_code,i.payment_date,sum(i.payment_fee) as payment_fee,i.payment_condition,i.payment_remark 
        from htgl_pact_apply a 
        inner join htgl_fee_instance i on a.apply_id = i.apply_id
        where a.payment_status=2         
        and a.company = v_company  
        and i.payment_date between to_date(v_sdate,'YYYY-MM-DD') and to_date(v_edate,'YYYY-MM-DD')
        group by a.company,a.pact_name,a.pact_code,i.payment_date,i.payment_condition,i.payment_remark;
     null;
       
       -- dbms_output.put_line(company);
       --


Ïà¹ØÎĵµ£º

aixÏ°²×°oracleÐĵÃ

ɾ³ýAIXϵÄORACLE
===========================================================
×÷Õß: wmlm(http://wmlm.itpub.net)
·¢±íÓÚ:2008.12.02 18:17
·ÖÀà: oracle
³ö´¦£ºhttp://wmlm.itpub.net/post/12871/474762
---------------------------------------------------------------
rm -Rf /etc/oratab
rm -Rf /et ......

Oracle sqlplus ÅäÖÃ

sqlplusµÄÅäÖÃÎļþΪlogin.sql£¬Í¨³£ÈçÏÂËùʾ´´½¨¸ÃÎļþ£º
set serveroutput on size 1000000
set trimspool on  --Â˳ýspoolÊä³öµÄ¿Õ°×
set linesize 200  --ÓÃÓÚÉ趨ÿÐÐÏÔʾµÄ¿í¶È
set pagesize 9999 --ÉèÖÃÏÔʾµÄÒ³Êý
set sqlprompt '_user @ _connect_identifier> '
½«¸ÃÎļþ¸´ÖƵ½Oracle°²×°Ä¿Â¼C ......

OracleËæ»úº¯ÊýµÄÓ÷¨

 ÈÝÒ×µÃ˵£¬¾­¹ýdbms_random°üµ÷ÓÃËæ»úÊýµÄ²½Öè´óÌåÓÐ4ÖÖ£º
Ò»¡¢dbms_random.normal
Õâ¸öº¯Êý²»´ø²ÎÊý£¬»á»Øµ½normal distributionµÄÒ»¸önumberÃÅÀ֮࣬ËùÒÔ´óµÖËæ»úÊý»áÔÚ-Ò»µ½Ò»Æä¼ä¡£
¼òÂÔ²âÊÔÁËÒ»ÏÂ×Ó£¬·¢×÷100000´Î×î´óÄܵ½ÎåÉÏÏ£º
SQL> declare
¶þ i number:=Áã;
Èý j number:=Áã;
ËÄ begin
Îå for ......

Oracle Latch¼°latchì¶Ü

 Ð¡Òý
Oracle RdbmsÊ©ÓÃÁ˸÷ÖÖ²»Í¬ÀàÐ͵ÄËø¶¨»úÖÆ£¬latchµÈÓÚ´ËÖеÄÒ»ÖÖ£¬ÕýÎĽ«¼¯ÖÐÒý¼ûlatch(ãÅ)µÄ¸ÅÄ¶®µÃlatchµÄ¶ÒÏÖ²½Ö貢˵Ã÷»½ÆðlatchĦ²ÁµÄÔµ¹Ê¡£
ʲôÊÇlatch
LatchÊÇÓÃÀ´±£»¤SGAÇøÖй²ÏíÊý¾Ý½á¹¹µÄÒ»ÖÖ´®Ðл¯Ëø¶¨»úÖÆ¡£LatchµÄ¶ÒÏÖÊÇÓë²Ù×÷ϵͳÏà¸ÉµÄ£¬ÓÈÉõºÍÒ»¸ö¹ý³ÌÊDz»ÊÇؽÐèµÈºòÒ»¸ölatch¡¢¼±ÐèµÈº ......

ѧºÃOracleÁùÌõ×ܽá

 
1¡¢Èç¹ûÓÐÒ»¶¨µÄÊý¾Ý¿â»ù´¡£¬ÖªµÀSQLÊÇÔõô»ØÊ£¬¼´Ê¹Ð´²»³öÀ´¼òµ¥µÄSQL£¬µ«¿ÉÒÔ¿´¶¯ËüÃÇ£¬Äã¾Í¿ÉÒÔÌøµ½2¡£·ñÔòÇëÏÈ¿´Ò»ÏÂÊý¾Ý¿â»ù´¡ºÍSQLÓïÑÔ£¬²»ÐèÒªºÜÉ¸ü²»ÐèҪȥ¼ÇÒäÄÇЩ¸´ÔÓµÄSQLÃüÁÕâЩ¿ÉÒÔÁôÔÚÒÔºó±ßÓ¦Óñßѧϰ¡¢¼ÇÒä¡£
¡¡¡¡
¡¡¡¡2¡¢ÒªÏëѧºÃORACLE£¬Ê×ÏÈҪѧϰORACLEµÄÌåϵ½á¹¹£¬ÏÖÔÚÄã²»ÐèÒªÉîÈëÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ