Reputation: 111
I was wondering that can you ask user for input at specific conditions?
I tried in my case and place the input &some_thing
in a condition but even when the conditions are not met it is still asking for input
Has anyone else tried this?
I am using toad for oracle
CASE DECODE(INITCAP(PA.ADDRESS_LINE1),'mycountry','NOT FOREIGN','FOREIGN')
WHEN 'FOREIGN' THEN TO_CHAR(&CRITERIA*PPP.PROPOSED_SALARY_N)
ELSE
TO_CHAR(PPP.PROPOSED_SALARY_N) END AS NEW_SALARY,
Upvotes: 0
Views: 156
Reputation: 142968
Thank you for editing the question & providing additional information.
As far as I can tell, you can't do that. TOAD (as well as SQL*Plus) will ask you for parameter's value, regardless of whether the condition is met or not.
But, why does that bother you? Provide its value and let query return the result.
Upvotes: 3