Jump to content

Another SELECT issue


rseigel

Recommended Posts

I have two tables that I'm trying to compare. I need to find items that are in tmp_BF and not in ps_product_supplier.
 
I'm using:
 

SELECT * FROM ps_product_supplier WHERE ps_product_supplier.product_supplier_reference NOT IN (SELECT supplier_reference FROM tmp_BF);

The column names are correct. The table names are correct. It returns zero rows even though I know for a fact that it shouldn't.
 
This must be something simple.
 
Any thoughts?
 
Thanks,
 
Ron

Link to comment
https://forums.phpfreaks.com/topic/297560-another-select-issue/
Share on other sites

I have two tables that I'm trying to compare. I need to find items that are in tmp_BF and not in ps_product_supplier.

 

I'm using:

 

SELECT * FROM ps_product_supplier WHERE ps_product_supplier.product_supplier_reference NOT IN (SELECT supplier_reference FROM tmp_BF);

 

Read carefully what you wrote (in red) and compare it with what you are doing in your select... you should be able to figure it out

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.