Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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
162 views