I have Sql Queries where in due to which it's effecting the performance of the package. ln_trans_type_id is the variable declared.
UPDATE invoice_table xai
SET process_flag = 'E',
error_description = 'Invoice Number Does not Exists '
WHERE xai.process_flag = 'N'
AND NOT EXISTS (
SELECT 1
FROM ra_customer_trx_all rct
WHERE rct.org_id = 1001
AND rct.trx_number = xai.invoice_number
AND rct.cust_trx_type_id = ln_trans_type_id
);
kindly please review and advise.
If you inside a package declare a variable (as
tempVar
) and pass later to update