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...
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...
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.*/...
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...
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...
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...
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
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...
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
(...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.