Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skip for already replaced records
Message
De
22/02/2005 10:09:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00989215
Message ID:
00989226
Vues:
37
Why not use SQL? This code can probably be made even more compact, but I find this more readable:
Select tableA && Never hardcode a work area, always use the form <b>USE tableA in 0</b> plus additional parameters.
Set Order To CODE
Scan for admtd=1 and !(code='A' or code='I')
  Insert into tableX (code,date,type,category,scode,lcode,sec) values (tableA.code,pdate,1,"P",tableA.scode,tableA.lcode,tableA.sec)
Endscan
Change tableA and tableX into your real table names.

>i have a table i want to replacement in a veriable as three type "P" ,"A" and "L"
>i replaced "A" and "L" first and then replace "P" with these codes:
>
>Select 6
>         Set Order To CODE
>         SCAN for admtd=1
>
>             grno = code
>             mscode = scode
>             mlcode = lcode
>             msec = sec
>
>                 Select 11
>                Append Blank
>                 Replace code With grno
>                 Replace date With pdate
>                 Replace type With 1
>                 Replace category With "P"
>                 Replace scode With mscode
>                 Replace lcode With mlcode
>                 Replace sec With msec
>
>                endscan
> endif
>endif
>
>my problem is this if i have replace P with these codes, also replaced the A and L records
>i want to mentain the A and L for "code" veriabel.(skip for A and l)
>thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform