SQL Update 1 tables columns from a different tables columns
Posted on 2007-11-28
Looking for some help with trying to write a stored procedure that will update 2 columns with values from another tables columns. I have a table that holds inventory items for both wherehouse locations. A user needs to look at what is in Wherehouse A and then builds a list of items that are needed at Wherehouse B. Once the user has done this an order is generated to be filled and shipped out. When wherehouse B recieves the order they check the qty and then updates the transfer request saying whether or not all items were received. My problem now is that I am needing to update the inventory table to show that items from wherehouse A are now in stock in wherehouse B.
I have no problems updating the transfer table when the items are recieved but now I have a problem updating the inventory table to show updated qtys and that the location has changed. What is the best way to do this?