Could you either repost this script or directly email it to me. The script is to insert the missing items into ItemDynamic table. I may have some items that are missing the Dynamic information. neil at kidsstuffsuperstore.com is my email. I would greatly appreciate it. This script was posted on 10/13/06 but my newsgroup won't go back that far.
DECLARE Item_Cursor CURSOR FOR select distinct item.id from item left join itemdynamic on item.id=itemid where itemid is null
open item_cursor FETCH NEXT FROM item_cursor into @ItemID WHILE @@FETCH_STATUS = 0 BEGIN DECLARE Store_Cursor CURSOR FOR SELECT id FROM store
OPEN Store_Cursor FETCH NEXT FROM Store_Cursor into @StoreID WHILE @@FETCH_STATUS = 0 BEGIN insert into itemdynamic(itemid,StoreID,quantitycommitted,quantity,ReorderPoint,RestockLevel,SnapShotQuantity,SnapShotQuantityCommitted) values (@ItemID,@StoreID,0,0,0,0,0,0)
FETCH NEXT FROM Store_Cursor into @StoreID END CLOSE Store_Cursor DEALLOCATE Store_Cursor FETCH NEXT FROM item_cursor into @ItemID
END CLOSE item_Cursor DEALLOCATE item_Cursor GO
For historical searching try Google Groups, you won't be able to find attachments though
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.