Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
[nQSError: 23006] The session variable has no value definition

Hi All,
I am facing issues when referencing a session variable from a session variable. Let me explain.
My requirement is to find the minimum transaction time for the latest date. The user has ability to change the date thru a prompt.
So, I created a session variable to be used as a request variable to find the Max date. I then created another initblock to find the Min time using this request variable. Both the Init blocks are working fine and returning correct results when doing a Test.
My request variable is working as expected. However, I am getting the mentioned error when using the Min Time session variable in the report.
Init Block 1 (for request variable) - select max(TRANSACTION_DATE) from TRANSACTIONS
Request Variable name - MAX_TRANS_DT
Init Block 2 -
select to_char(min(TXN_TIME), 'mm/dd/yyyy hh24:mi:ss') from TRANSACTIONS where TRANSACTION_DATE = to_date('VALUEOF(NQ_SESSION.MAX_TRANS_DT)', 'yyyy-mm-dd hh24:mi:ss')
Any help is greatly appreciated.
Answers
-
Hi,
Why don't you just merge the 2 queries together and return both variables from a single init block?
It's pure SQL, so you can perfectly do it ...
0 -
Gianni,
Thanks for your reply. I have now combined the query like below into one init block:
select to_char(min(TXN_TIME), 'mm/dd/yyyy hh24:mi:ss'), max(TRANSACTION_DATE)
from TRANSACTIONS
where TRANSACTION_DATE = (select max(TRANSACTION_DATE) from TRANSACTIONS)
I have made all two variables as request variable. The weird thing is MAX_TRANS_DT is working fine, but MIN_TRANS_TIME is still giving me the same error. Any ideas?
Thank you!
Ravi
0 -
You maybe still have the second init bloc defined? (you forgot to delete it...)
0 -
Hi Gianni, I had it deleted but was using the wrong variable name . Thanks for your help. Works perfectly.
0 -
Good that you have you 2 variables and no error anymore
So you can maybe close the thread? For now it's still This question is Not Answered.
0