Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Row value in a URL in a select statement

mterleskyJul 26 2010 — edited Jul 27 2010
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2010
Added on Jul 26 2010
4 comments
700 views