Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: conditional selection of 'AND'

Re: conditional selection of 'AND'

From: Alan <alan_at_erols.com>
Date: Mon, 19 Apr 2004 13:52:02 -0400
Message-ID: <c613k3$6qbp8$1@ID-114862.news.uni-berlin.de>


You have provided a potential solution without fully describing the actual problem that needs to be solved, so the answer is, "it depends". This is obviously a school assignment, and congratulations for attempting to solve it before asking for help. But, what exactly is the assignment?

"Rohit Dhawan" <rohit_reborn_at_yahoo.com> wrote in message news:c76d1c78.0404171636.3306306f_at_posting.google.com...
> I have one query similar to the following:-
>
> select coursenum,sectionnum,instructor from
> SECTION s where (sectionnum = '001')
> and coursenum LIKE 'MATH%'
>
>
> but is it possible to add another 'and' condition to the above query
> provided a certain user parameter = 'add'
>
> for e.g
>
> select coursenum,sectionnum,instructor from
> SECTION s where (sectionnum = '001')
> and coursenum LIKE 'MATH%'
> and instructor LIKE 'L%' i.e. only and only if :parameter = 'add' else
> the above query gets executed.
>
> I do not want to use procedure for the above as I think everyting can
> be done using and,or,not
Received on Mon Apr 19 2004 - 12:52:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US