Hi there,
I am trying to query a products table that lives on ServerA for products that have > 0 inventory and sub query a transaction table on ServerB for sales in the last six months.
Basically I want to display products that we have on hand that havn't sold in 6 months (bad retail!)
Here is my attempt at the query.
I have spot checked the results and find that I have actually sold some of the returned products in the last six months.
Can anyone help to isolate the problem? Please let me know if any clarification is required.
Thanks for any help you can offer.
Peter.
Remember- It's nice to be important,
but it's important to be nice
I am trying to query a products table that lives on ServerA for products that have > 0 inventory and sub query a transaction table on ServerB for sales in the last six months.
Basically I want to display products that we have on hand that havn't sold in 6 months (bad retail!)
Here is my attempt at the query.
Code:
SELECT DISTINCT d3sync.d3_import.ivmst_id, d3sync.d3_import.rsv_desc FROM d3sync.d3_import WHERE inv > 0 AND d3sync.d3_import.ivmst_id NOT IN (SELECT translog.translog.Prod FROM translog.translog WHERE `Date` >= '2009-08-12 12:33:59')
I have spot checked the results and find that I have actually sold some of the returned products in the last six months.
Can anyone help to isolate the problem? Please let me know if any clarification is required.
Thanks for any help you can offer.
Peter.
Remember- It's nice to be important,
but it's important to be nice