Asked • 06/25/19

Oracle - If variable is null?

I need to return some dummy select when my variable matches string. This is what I tried: begin if :someVar = 'Yes' then select 1 from dual; end if; end; / I've tried declaring a variable for INTO clause, but I allways receive error "**PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following..**". Can somebody show what should I change to get desired select ? I'm beginner in Oracle, and I need this for SSRS reports, for setting parameter default values (based on another parameter - which is **someVar** in my question).

1 Expert Answer

By:

CHADI E. answered • 07/01/19

Tutor
New to Wyzant

PhD in Systems Engineering with 8+ years expereince in Oracle SQL

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.