I have been stuck on this error for few hours.
I have parameterized this select query
--Original query
SELECT DISTINCT col1 FROM table1;
to this which erroring out ORA-00904: "A"."col1": invalid identifier 00904. 00000 - "%s: invalid identifier"
--Parameterized query
SELECT DISTINCT A.col1 as col1 FROM (SELECT cont_code FROM dt5_campaign_code
where code_id = &test_cont_id) A;
Nested query outputs
SELECT cont_code FROM dt5_campaign_code
where code_id = &test_cont_id;
Found a solution here. Please help in translating this for my query.
