SQL Statment for Reorder Points/Restock Level

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

Reply to
ChrisR
Loading thread data ...

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,

Reply to
Mahmoud Amin

Sorry, it is :

Reply to
Mahmoud Amin
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

Reply to
Nashat

Reply to
ChrisR

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.