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: SQL question

Re: SQL question

From: Saqib Zulfiqar <saqib.zulfiqar_at_cressoft.com.pk>
Date: Thu, 11 Jun 1998 07:43:55 GMT
Message-ID: <6lp8s3$l0g$1@sussi.cressoft.com.pk>


HI Zyber,

This query will also give the desired result

select b.name, b.state
from customer a, friend b
where a.name (+) = b.name
and a.name is null
;

zyber <zybermaniac_at_hotmail.com> wrote:

>I have 2 tables:
>FRIEND
>--------------
>NAME STATE

>DAVE CA
>MATT TX
>HAL VA
>JAN TX

>CUSTOMER
>--------------
>NAME OWED

>HAL 45.50
>FRANK 12.35
>KEITH 5.15
>JAN 12.10

>How do I write SQL statement to list all
>friends who are not my customer?
>(which is Dave and Matt)

>I tried this but didn't work:

>SELECT F.NAME "NAME", F.STATE "IN"
>FROM FRIEND F, CUSTOMER C
>WHERE F.NAME <> C.NAME;

>Thanks in advance,
>Z

////////////////////////////////////////////
//                                        //
//           Saqib Zulfiqar               //
//           Software Engineer            //
//           CresSoft Pvt Ltd.            //
//           Lahore, Pakistan.            //
//E-Mail :saqib.zulfiqar_at_cressoft.com.pk  //
//                                        //
////////////////////////////////////////////

I get melancholic sometimes, but I've learned to enjoy it Received on Thu Jun 11 1998 - 02:43:55 CDT

Original text of this message

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