Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ronanBas

    String buffer too small

    Thanks Carp and tauprhio Problem resolved when I rest the PL/SQL variable size :) Thanks
  2. ronanBas

    String buffer too small

    The following function returns the delimited string CREATE OR REPLACE FUNCTION GET_DELIMITED_STR ( p_cursor sys_refcursor, p_del varchar2 := ',' ) return varchar2 is l_value varchar2(32767); l_result varchar2(32767); begin loop fetch p_cursor into l_value...
  3. ronanBas

    using dynamic SQL and CURSUR effectively

    here is my full procedure code CREATE OR REPLACE PROCEDURE GLRS.PRC_GLRS_OPICS_ENRICH_DATA(PO_ERROR OUT VARCHAR2, PO_ERROR_DESC OUT NOCOPY VARCHAR2) AS CURSOR get_opics IS SELECT...
  4. ronanBas

    using dynamic SQL and CURSUR effectively

    I have decoded to use the approach 1 the code is as below V_MAR_QRY := ' (SELECT CF.TBL_GLRS_MU_ID FROM GLRS.TBL_GLRS_INTERIM_MAR_CONF CF WHERE CF.TBL_GLRS_MAR_CONF_ID = PR.TBL_GLRS_MAR_CONF_ID) TBL_GLRS_MU_ID '; /*Base query for selecting rules from the OPICS rules table.*/...
  5. ronanBas

    using dynamic SQL and CURSUR effectively

    for opics_prodtype(i).OPICS_TYPE = 'BY' then values populated for V_PROD_LINE_ID,V_PROD_LINE_TYPE_ID,V_PROD_LINE_SUB_TYPE_ID and V_MU_ID are different than that populated for opics_prodtype(i).OPICS_TYPE = 'RG' thats why two updates and here is my modified code using FORALL CURSOR...
  6. ronanBas

    using dynamic SQL and CURSUR effectively

    Thanks Please elaborate on points mentioned b) if cursors have to be used, use block selects, inserts and updates. In example b, you go half-way towards this by doing a block select but you don't use the forall functionality to do the update. c) Avoid repeated cursors like the select to get...
  7. ronanBas

    using dynamic SQL and CURSUR effectively

    Im updating the table GLRS.TBL_GLRS_GT_PRC_FEED with the enriched data based on the OPICS_TYPE value usng two approaches The other mapping tables are GLRS.TBL_GLRS_OPICS_RULES and GLRS.TBL_GLRS_OPICS_TYPE CREATE TABLE GLRS.TBL_GLRS_OPICS_RULES ( TBL_GLRS_OPICS_RULES_ID NUMBER(38,0) not...
  8. ronanBas

    IF ELSIF removal

    Thanks all problem resolved
  9. ronanBas

    IF ELSIF removal

    Thanks I have made the changes now FOR i in 1..v_tenor_bucket_name.COUNT LOOP IF i.code = 'D' THEN v_inc_date:= v_start_dt; Error: PLS-00487: Invalid reference to variable 'I' Line: 63 Text: IF i.code = 'D' THEN
  10. ronanBas

    IF ELSIF removal

    CREATE OR REPLACE FUNCTION fn_tenor_bucket_poc ( pi_template_desc VARCHAR2, pi_as_of_date DATE, pi_cashflow_date DATE) RETURN DATE IS PRAGMA AUTONOMOUS_TRANSACTION; v_cashflow_date DATE; v_start_dt DATE...
  11. ronanBas

    IF ELSIF removal

    Thanks all for your comments I have modified the procedure and the variables are as below v_tenor_bucket_name glrs.tbl_glrs_user_tenor_buckets.tenor_bucket_name%TYPE; v_code glrs.tbl_glrs_tenor_bucket_type.code%TYPE; v_tenor_bucket_value...
  12. ronanBas

    IF ELSIF removal

    In my procedure I have used IF ELSIF often . The part of the procedure is as attached . is there any other way to replace the IF ELSIF in above case and improve performance or may be remove the cursor loop completely ? Thanks create or replace FUNCTION fn_tenor_bucket (...
  13. ronanBas

    Remove if else and use CASE instead

    Thanks all I had to remove the CASE and MERGE the DELETE as below DELETE FROM INTERIM_AUTO_CASHFLOW AC WHERE EXISTS (SELECT * FROM INTERIM_AUTO_CASHFLOW AC, pl_mu_con_mat_conf AF...
  14. ronanBas

    Remove if else and use CASE instead

    Thanks my question is how to embed a CASE statement within the IF statement?
  15. ronanBas

    Remove if else and use CASE instead

    Friends How can we use CASE statements in the following code 28: IF (V_SOURCE_CODE = 'DEPOSIT') THEN DELETE FROM INTERIM_AUTO_CASHFLOW AC WHERE EXISTS (SELECT * FROM...

Part and Inventory Search

Back
Top