Re: easy question
Posted in 2004
SELECT table1.number, table1.lname FROM table1, table2
WHERE table1.number = table2.number AND
table1.lname <> table2.lname
I think this is what you are asking for.
Rob Vorbroker
--- Rein Puksand <rpuksand@epbe.ee> wrote:
> Hello,
>
> Easy question!
> Two tables table1 (number, lname) and
> table2(number,lname).
> I want to find elements (lname) from table1, only
> that not exist in table2
> but values in number fields are equal?
>
> table1.number = table2.number and table1.lname not
> in table2.lname
> Example:
>
> Table1
>
> 1 Marc
> 2 Edy
> 1 hex
> 4 Mary
> 2 Sed
>
> Table2
>
> 1 hex
> 1 Sed
> 4 Mary
> 1 Marc
> 2 troy
>
> and result must be: 2 Edy, 2 Sed
>
> What is sql?
>
> very thanks,
> Rein
>
>
=====
Rob Vorbroker Phone: 513/336-8695
Vorbroker Consulting, Inc. Fax: 513/336-6812
www.vorbroker.com robv@vorbroker.com
sending to informix-list