Forum Moderators: open
I have distributors drop ship, and will continue with that. The problem is keeping track of what's in stock. I'd hate to have to go to each distributor's site every night and check all of the SKU's to see if any are out of stock.
One distributor has an Excel file that's updated every evening with quantities in stock. I can import the file into a SQL server database, and have a "show if number >0" behavior on the pages for items that are in stock.
The problem is that another distributor uses different product ID's for the same make and model of widget.
Is there a way to get the data from the two distributors for quantity, even though one uses an Excel file, and the other an XLS file?
Any suggestions or ideas would be very, very appreciated.
The problem with importing from both is that each distributor has its own unique product number. One may have an Acme #1 Widget listed as part number RS700, while the other distributor has it listed as part number 12345.
One of the distributors has the manufacturers' model numbers in the data, but I don't think the other distributor has the manufacturer model numbers.
Is it possible to do an inner or outer join query on two different tables, one getting the quantity for part number RS700 and another getting the quantity for part number 12345 from the second table?
All I'm trying to get is the quantity so that I can write a query where the quantity is equal to or greater than one, so I can display "in stock" or "out of stock".
I tried a union query like this:
Select sum(productQuantity) from dbo.tableA where productID='12345' UNION select sum(columnNameQuantity) dbo.tableB where itemID= 'ABCD' .
That won't work, though, because it returns two different values.
There must be a query string that would return a single value, but I don't know how to write it.
The query is
Select [one column with the same name from both tables] from dbo.TableA, dbo.TableB where (productID='12345' and itemID= 'ABCD') and (productQuantity >= '1' and columnNameQuantity >= '1')
What good is taking classes when you just forget everything a year or two later? ;)