I'm trying to port over a sqlplus report to SQL Developer. How do you embed a special character or return? SQL
select ' Action: &&V_PATCH &&V_ACTION' || chr(10) ||
'Database: '|| instance_name || chr(10) ||
' Date: '||to_char(sysdate,'DD-MON-YYYY HH24:MI') || chr(10)
from v$instance; script window output:
Date: 16-APR-2013 19:19 Expected Output:
Action: 9714783 Patch Summary
Date: 16-APR-2013 18:48
How do you have the user respond for report inputs?
define V_PATCH = &PATCH
define V_SNAPSHOT = &SNAPSHOT_ID
The &PATCH and &SNAPSHOT_ID windows pop up when I run it in the sql worksheet, but do not when I try to run them from via the report window. I get the following error in the login window:
'Warning, unhandled exception: ORA-00922: missing or invalid option'
Thanks in advance for your help!
Edited by: user10401849 on Apr 16, 2013 12:27 PM
Edited by: user10401849 on Apr 16, 2013 12:29 PM
For the case of worksheet script, the special characters work fine for me in 3.2.20.09.87. What version are you on?
When running the query from the Reports view, here are a couple of hints
1. In the report's SQL Query definition, use Style: Script, not Table
2. Edit your SQL Query to use bind variables, not substitution variables, like so...