Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Unmatched or bastard records

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-10 : 09:23:39
Chris writes "I want to find unmatched records in my orders table...so that only orders that are matched with a customer are left. There are many bastard orders floating out there that I need to get rid of.


SELECT *
FROM orders
WHERE order_customer NOT IN (SELECT customerID FROM customers)

I tried that but it seems to take forever."
   

- Advertisement -