Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Help!

Status
Not open for further replies.

2742

Programmer
Apr 23, 2001
34
NZ
Hi Every One
I am having a bit of a problem writing this query! It should be simple.

Here's my problem. I have two tables - one with just customer_numbers and the other with the customers record including thier customer_number. I want to select all customer_numbers out of table one which don't appear in the second table(customer records).

select cust_no from purge left outer join testcustomers
on cust_no != Account ; doesn't work!

Please help there must be a better way to do it!

Thanks
 
It's alright i finally got it and yes is was simple.
The answer is:

select cust_no from a where a.cust_no not in (select cust_num from b)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top