I'm trying to SELECT a field (ProductID) from 'Table a' WHERE two corresponding fields are equal (a.PUBLISHER = b.Vendor AND a.NUMBER = b.VIN)


Table 'a' (approximately 100,000 records): +================================+ | ImportLiebermansStep3Add | +================================+ | ProductID | PUBLISHER | NUMBER | +-----------+-----------+--------+ | ACC_4076 | ACC | 4076 | | BCD_300 | BCD | 300 | | DEC_R50 | DEC | R50 | | WIN_220 | WIN | 220 | +-----------+-----------+--------+

Table 'b' (approximately 20,000 records):
+================================+
| ProductsOLD                    |
+================================+
| ProductID | Vendor    | VIN    |
+-----------+-----------+--------+
|           | ACC       | 4076   |
|           | BCD       | 9999   |
|           | DEC       | R50    |
+-----------+-----------+--------+


Here's my Query....

SELECT a.ProductID FROM ImportLiebermansStep3Add a
LEFT JOIN ProductsOLD b ON a.PUBLISHER=b.Vendor AND a.NUMBER=b.VIN
WHERE b.ProductID IS NULL;

But this query runs, and runs, and runs, and runs, and runs without ever giving results.

What am I missing???

Thanks!
-Jeff Gannaway
_______________________________________________

http://RadioU.com
This Is Where Music Is Going - Listen Online!
_______________________________________________



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to