I am stuck with the problem for so long. Could you please help.
Some how, I need to get around AND EXISTS ( Sub Query)
SELECT nl.title,
COALESCE(CHAR(ac.currentcy_date,'MM/DD/YYYY'),' '),
COALECE(CHAR(ORA8.ADD_MONTHS(ac.currentcy_date, co.currentcy_interval),'MM/DD/YYYY'),'Needs Initial Review'),
n.menu_position
FROM navbar_links nl,
navbars n,
ap_profile ap,
company co,
cy_review_sections crs RIGHT OUTER JOIN currentcy_review ac RIGHT OUTER JOIN
ON ac.applID = 3
ON ac1.cy_section_link_id = crs.cy_section_link_id
AND crs.cy_section_link_id = nl.link_id
AND nl.link_id = n.link_id
AND n.navbar_id = 9
and ap.appl_id = 3
AND co.company_id = ap.company_id
AND EXISTS
(SELECT 'x'
FROM ap_profile ac2, company co2
WHERE ac2.appl_id = 3
AND co2.company_id = ac2.company_id
AND co2.currentcy_interval > 0 AND co2.currentcy_interval is not null)
I get the following Error:
SQL0010N The string constant beginning with "x' FROM ap_profile
ac2, company co2 WHERE ac2.appl_id = 3 AND co2.comp" does not
have an ending string delimiter.
Explanation:
The statement contains a string constant, beginning with
"<string>", that is not terminated properly.
The statement cannot be processed.
User Response:
Examine the statement for missing apostrophes in the indicated
string constant.
sqlcode : -10
sqlstate : 42603
The sub query when I run separately runs perfect:
db2 => SELECT 'x' FROM ap_profile ac2, company co2 WHERE ac2.appl_id = 3 AND co2
.company_id = ac2.company_id AND co2.currentcy_interval > 0 AND co2.currentcy_in
terval is not null
1
-
x
1 record(s) selected.
I have difficulty putting this into query above.