|
Posted by nt8378 on November 20, 2006, 2:25 pm
Please log in for more thread options Rob,
Thank you for this script. I greatly appreciate it.
Sincerely,
Neil
"Rob" wrote:
> declare @StoreID int
> declare @ItemID int
>
> 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
> http://groups.google.ca/group/microsoft.public.pos?lnk=oa&hl=en
>
> Rob
>
> > Nashat,
> >
> > 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.
> >
> > Thank you,
> > Neil
>
>
>
|