Skip to Main Content

SQL & PL/SQL

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!

assinging default values when nothing input to varibale by user.

529810Sep 7 2006 — edited Sep 8 2006
Hello I need to right a script that will ask for 2 date ranges to be specified by the user, this script should default to the earliest and most recent date in a table if the user dosent enter anything for each value. My script will be something like this

SELECT *
FROM table1
WHERE order_date BETWEEN &var1 AND &var2

I tried using define to give the variables an initial value but instead the script uses that value and dosent ask for input. Is it possible to use varibales this way and if so then how can I do it.

Thanks

Mike
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2006
Added on Sep 7 2006
20 comments
1,509 views