Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A query that uses not equals
SELECT CUSTOMER.CUS_CODE, CUSTOMER.CUS_BALANCE
FROM CUSTOMER, INVOICE
WHERE (INVOICE.INV_DATE <to_date('08/18/1999','mm/dd/yyyy') or
INVOICE.INV_DATE >=to_date('08/20/1999','mm/dd/yyyy')ORDER BY CUSTOMER.CUS_CODE; which says everything before 8/18/1999 at midnight and everything on or after 8/20/1999
"Cherron" <twitched_at_msn.com> wrote in message
news:bd72678d.0210271036.41af0fe2_at_posting.google.com...
> I have a customer table
>
> cus_code PK
> cus_balance
>
> and a invoice table
>
> cus_code FK
> inv_number
> inv_date
> invo_items
>
> I need to be able to select the customers that did not make purchases
> on 8/18/1999 and 8/19/1999
>
> The code that I came up which is listed below does not work because
> the syntax is wrong and I gues the logic as well.
>
> SELECT CUSTOMER.CUS_CODE, CUSTOMER.CUS_BALANCE
> FROM CUSTOMER, INVOICE
> WHERE INVOICE.INV_DATE != "08/18/1999" OR INVOICE.INV_DATE != "
> 08/19/1999"
> ORDER BY CUSTOMER.CUS_CODE;
>
> Can anyone tell me what I am doing wrong? I would appreciate your
> help.
>
> Thanks
Received on Sun Oct 27 2002 - 13:08:28 CST