Hello,
I'm trying to provide a link to a form in a report. There value of the field is conditional.
This is the query:
select
a.req_id,
b.sorr_id,
b.REQ_TITLE,
b.REQUESTOR_NAME,
c.analyst_name,
b.REASON,
b.CATEGORY_SORR,
CASE
WHEN b.sorr_id is NULL THEN
'<a hreff="f?p=&APP_ID.:2:&SESSION.::::P2_SORR_ID_1:">Create</a>'
ELSE
'<a hreff="f?p=&APP_ID.:2:&SESSION.::::P2_SORR_ID_1:'||#SORR_ID#||'">Edit</a>'
END as edit
from pr_cpitdev.sr_requests a, ds_request b, ds_analyst c
where a.req_id = b.sorr_id (+) and
b.ANALYST_ID = c.ANALYST_ID (+) and
a.proc_area_id = 'RP'
the issue is with this line:
'<a hreff="f?p=&APP_ID.:2:&SESSION.::::P2_SORR_ID_1:'||#SORR_ID#||'">Edit</a>'
The 'hreff' is really 'href' - I just could not figure out how to escape it on this forum. sorry.
I'm trying to insert the value of the column for each row using the #variable# format but having trouble with the syntax.
This gives me a parsing error. If I don't use the concatenation, it reads the whole line literally and inserts '#SORR_ID#'.
Any help is appreciated.
Thanks,
Matt