04 2012 档案
摘要:1.translate 语法:TRANSLATE(char, from, to) 用法:返回将出现在from中的每个字符替换为to中的相应字符以后的字符串。 若from比to字符串长,那么在from中比to中多出的字符将会被删除。 三个参数中有一个是空,返回值也将是空值。 举例:SQL> select translate('abcdefga','abc','wo') 返回值 from dual; 返回值 ------- wodefgw 分析:该语句要将'abcdefga'中的'abc'转换为'wo&#
阅读全文
摘要:网上的解决方法:Cause:A reference was made to a variable not listed in the SELECT clause. In OCI, this can occur if the number passed for the position parameter is less than one or greater than the number of variables in the SELECT clause in any of the following calls: DESCRIBE, NAME, or DEFINE. In SQL*Form
阅读全文
摘要:AR中发票资料中看科目组合信息:SELECT * FROM ar.ra_customer_trx_all rct, ar.ra_customer_trx_lines_all rctl, ar.ra_cust_trx_line_gl_dist_all rctgl, apps.gl_code_combinations gcc -- 账户组合 WHERE rct.customer_trx_id = rctl.customer_trx_id AND rctl.customer_trx_line_id ...
阅读全文
摘要:select customer_name, customer_number, extended_amount, description, price, quantity, salename, startdate, enddate from (select hpt.party_name customer_name, hca.account_number customer_number, decode(ctl.gross_extended_amo...
阅读全文
摘要:今天简单的总结一下PL/SQL中cursor(光标/游标)的用法。相信不少做开发或维护的DBA在找工作的时候,遇到过类似的面视问题:请简单的描述一下光标的类型,说一下普通光标和REF光标之间的区别,以及什么时候该正确应用哪一个? 这个题目,我着实难住了不少人,其实他们在具体开发的时候,也还是比较能够把握正确的光标的使用的,但就是说不出来,当然了,这与大家自身的沟流交通能力是有关系的。有的人不善于说,但做的却很好。扯的扯就走远了,最后唠叨一下:做技术这条路,能干不能说,或者说会干不会包装,路是走不"远"的。一、显式cursor显式是相对与隐式cursor而言的,就是有一个明确
阅读全文