App Muncher

Issues faced - solutions identified - shared with community.



Recently came across the error on running crystal report.

The report was developed some time in 2009, using an older version of oracle.

The current Oracle version installed on db server was Oracle 12 G.



Here is a screenshot of the error thrown.









The issue was rectified by updating the script.


The syntax in SYS_CONNECT_BY_PATH caused the entire issue.



  1. Existing Code
    LEFT OUTER JOIN    (SELECT  sorce_refno AS sorce_refno_i,
                               SUBSTR(MAX(REPLACE(SYS_CONNECT_BY_PATH(DEPRES_DESC, '/'),'/',',')),2) dep_res
    
  2. Required Code
    LEFT OUTER JOIN    (SELECT  sorce_refno AS sorce_refno_i,
                               SUBSTR(MAX(REPLACE(SYS_CONNECT_BY_PATH(DEPRES_DESC, '//'),'//',',')),2) dep_res
    

You can either use
//
or
*/
to overcome the issue.


Hope you find this helpful.


No comments:

Post a Comment

| Designed by AppMuncher