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!

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

SureshDooly-Oracle

$oerr ora 12154
ORA-12154: TNS:could not resolve the connect identifier specified

Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured.
For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.

Please cross-check the below:

Action: The following actions may be appropriate:
If you are using local naming (tnsnames.ora file):
Make sure that TNSNAMES is listed as one of the values of the names.directory_path parameter in the sqlnet.ora Oracle Net profile.
Verify that a tnsnames.ora file exists and is in the proper directory and is accessible.
Check that the net service name used as the connect identifier exists in the tnsnames.ora file.
Make sure there are no syntax errors anywhere in the tnsnames.ora file. Look for unmatched parentheses or stray characters. Errors in a tnsnames.ora file may make it unusable.

1 - 1

Post Details

Added on Jun 15 2021
6 comments
167 views