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

Home -> Community -> Usenet -> c.d.o.server -> Re: help with multiple BETWEEN statements

Re: help with multiple BETWEEN statements

From: Ban Spam <ban-spam_at_operamail.com>
Date: Sun, 12 Jan 2003 17:38:38 GMT
Message-ID: <Xns9301625BEBEFESunnySD@68.6.19.6>


hlngus_at_hotmail.com (Yvonne G) wrote in
news:d999b872.0301120842.66c00282_at_posting.google.com:

> Can someone provide an assist with compound BETWEEN syntax?
>
> I want to enforce the following:
>
> SELECT A from table1
> where rate = 'abc'
> and code between '0100' and '0199'
> and code between '4000' and '4499'
> and code between '7000' and '7999'
> and code between '9000' and '9499'
> etc, etc.
>
> What is the proper syntax?
>
> Thanks.
>

How can rate be between 0100 and 0199 AND at the same time between 4000 and 4499?

I suspect that you really should be using "OR" in place of "AND".

HTH & YMMV HAND! Received on Sun Jan 12 2003 - 11:38:38 CST

Original text of this message

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