Skip to Main Content

SQL & PL/SQL

How to write code efficiently

User_R4VJDJun 15 2021
   cur1 and cur2 - cursor value  

p_vent - In parameter of procedure

SELECT max(generation_date)
FROM T1
WHERE c_cd=cur1.c_cd
AND d_cd=cur1.d_cd
AND l_cd=cur1.l_cd
AND T1_sub_l =cur2.sub_lat
AND T1_cln =NVL (p_vent, '%')
AND via = (select via
from T2
where l_cd=cur1.l_cd
AND sub_l=cur2.sub_lat
AND cln =NVL (p_vent, '%')
AND p_cd=NVL (p_pri_code, '%'));

How can we write this code efficiently in oracle 11g

Comments
Post Details
Added on Jun 15 2021
6 comments
98 views