Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help Needed - Varying Input Problem
pankaj_wolfhunter_at_yahoo.co.in wrote:
> Greetings,
>
> The requiremnt gathers a set of inputs from from end and based on
> these input conditions we have to fetch values from our db tables.
>
> Preety simple but the problem here is the inputs are not fixed.
>
> Say in all, we have 10 inputs in our front end but the user only
> selects 5 of them or may be 2 or all 10.
>
> How should I build by query so it takes all the valid inputs.
>
> One way is so use a set of if...else. But is there any other
> alternative?
> Can I use case statement here? Can I achieve this in a single
> statement?
>
> Any help would be appreciated.
>
> We are using Oracle 9i.
>
> TIA
Go to Morgan's Library at www.psoug.org and click on Native Dynamic
SQL.
Scroll down to: "Demonstration Of Dynamic SQL Statement Creation."
What you are describing is precisely why this code was written.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Jun 07 2007 - 12:43:38 CDT
![]() |
![]() |