Skip to Main Content

Analytics Software

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!

server variable

slider rulesJan 4 2018 — edited Jan 4 2018

Hi,

I am using OBIEE 11.1.1.7.16, I am working on a direct database request that references a date presentation variable. I would like to default the presentation variable to a server variable(prior month start date & prior month end date)

and orderdate BETWEEN TO_NUMBER(TO_CHAR(TO_DATE( '@{fromdate}{VALUEOF(NQ_SESSION.PRIOR_MONTH_START_DT)}', 'YYYY-MM-DD HH24:MI:SS'), 'YYYYDDD'))-1900000 AND TO_NUMBER(TO_CHAR(TO_DATE('@{todate}{VALUEOF(NQ_SESSION.PRIOR_MONTH_END_DT)}}', 'YYYY-MM-DD HH24:MI:SS'), 'YYYYDDD'))-1900000

the query is not returning any data but if I replace the server variable with hardcoded dates 2017-12-01 to 2017-12-31 there is output returned. I checked the query log and there is no server variable date being passed. I can view the server variable dates in the rpd so not an issue with the variable

Is the above syntax incorrect?

Thanks

Comments

spajdy

I'm not sure that CANCEL is valid command, but anyway create a simple text file <name>.sql and write all commands you want to run there. <name> - replace by any meaningful name Then run SQL*Plus log in and run you script file by @<name>

User_MV0PW

"CANCEL" is not a command, it's a response for "RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;" command. I enter "RECOVER ..." command, I got a question "Specify log: {<RET>=suggested | filename | AUTO | CANCEL}", I should enter "CANCEL" as an answer for that question, but not as a command.

Billy Verreynne
Answer

You can try redirecting stdin (standard input) to your bash process.
E.g.

sqlplus "/ as sysdba" <<EOF
  recover ...
  cancel
  exit
EOF

EOF is simply a text token used to mark where stdin redirection need to cease.

Marked as Answer by User_MV0PW · Aug 24 2021
User_MV0PW

THANK YOU VERY MUCH!!! IT WORKS!!!

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details