Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple problem...
Message
 
 
À
29/08/2000 08:50:05
Mark B Littman
Personalized Software Solutions Inc.
Jensen Beach, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00410173
Message ID:
00410202
Vues:
13
Try this

Use arivt
select * from arinvt where whse = "000" into table tempcopy1.dbf
use tempcopy1
replace whse with "099" all
SELECT tempcopy1
SCAN
SCATTER MEMVAR
SELECT arivt
LOCATE FOR item_key = tempcopy1.item_key AND whse = "099"
IF NOT FOUND()
INSERT INTO ARIVT FROM MEMVAR
ENDIF
SELECT tempcopy1
ENDSCAN


This will "copy" the items from Warehouse "000" to Warehouse "999" and only do it once. After this runs your will believe there are identical items in both warehouses.



>I have an item/whse file that may contain 5000 item/warehouse records. I want to copy all items from warehouse "000" to warehouse "099". This is easy enough using the following code:
>
>Use arivt
>select * from arinvt where whse = "000" into table tempcopy1.dbf
>use tempcopy1
>replace whse with "099" all
>close all
>use arinvt
>append from tempcopy1
>
>this works great...however...if you run it twice it duplicates all the records in the file...how can I avoid duplications?
>
>I have several indexes...item/whse that are set to unique and/or primary...but this does not solve the problem.
>
>any ideas?
Ken Wardwell
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform