Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help with multiple BETWEEN statements
hlngus_at_hotmail.com (Yvonne G) wrote:
> 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?
That does appear to be proper syntax. The semantics are pretty darn silly (how can code simultaneously satisfy mutually exclusive conditions?), but the syntax appears correct.
What error are you getting? What are trying to do?
Xho
-- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service New Rate! $9.95/Month 50GBReceived on Sun Jan 12 2003 - 17:35:33 CST