Reference field from a select within select
523585Jun 24 2008 — edited Jun 24 2008I have a query that I am trying to create where a field is described through another select in the query. For example:
SELECT id, (select flavor from icecream where id = 1)
FROM person
----------------------------------------------------------------------------------
however in the WHERE clause I want to reference the flavor field like this:
instr(upper("id"),upper(nvl(:P1_REPORT_SEARCH,"id"))) > 0
instr(upper("flavor"),upper(nvl(:P1_REPORT_SEARCH,"flavor"))) > 0
However the id is fine, but the flavor field gives invalid identifier error. Does anyone know a work around?
I'd really appreciate any help. Thank you