Does anyone have, or know what SQL statement will work to copy Reorder Points/Restock Levels from an existing store into another store in HQ Admin? I have a store that I want to have the same reorder and restock points as another store and I would like to just run one/two SQL statements to copy all the values. Thanks, Chris
SQL Statment for Reorder Points/Restock Level
Sep 20, 2006
4 Replies
Select ItemID,SnapshotReorderPoint,SnapshotRestockLevel from itemdynamic
Into #MyTemp
Where StoreID = X
Update ItemDynamic
Set ItemDynamic.ReorderPoint=#MyTemp.SnapShotReorderPoint
,RestockLevel=#MyTemp.SnapShotRestockLevel
from ItemDynamic,#MyTemp
Where ItemDynamic.ItemID=#MyTemp.ItemID
and StoreID = Y
Then You Must Creating a worksheet (308 Chang Stocking Info) for Store Y .
Note That : This will updating all Items, You can add any condition to the where statement like departmentid or categoryid if you need to updating a specific department or category.
Regards,
Sorry, it is :
1-add a linked server to the server from which u want to get the restocking info
2- make sure "Distribured Transaction Coordinator" service is running
3-run the following query on the server u want to update,
*****************************************************
--u need to replace YourIP,YourID,YourPassword, and YourDB update item set Item.ReorderPoint =SI.ReorderPoint ,Item.RestockLevel=SI.RestockLevel from OPENDATASOURCE( 'SQLOLEDB', 'Data Source=YourIP;User ID=YourID;Password=YourPassword' ).yourDB.dbo.Item SI where item.hqid=si.hqid
********************************************** Nashat
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required