Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find numbers that contain and add to a diff field
Message
De
25/06/1999 10:45:18
Brad Stickley
Parker Pneumatic Div. North America
Wake Forest, Caroline du Nord, États-Unis
 
 
À
24/06/1999 11:00:39
Paul Frost
Instem Computer Systems Ltd
Stone, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00233452
Message ID:
00233959
Vues:
46
>>>>>>I have a table with part numbers that show a length for the part numbers in another field.
>>>>>>
>>>>>>I need to find all of the numbers that contain "2479" and replace the length for these numbers with a value that is 4 more than the current value.
>>>>>>
>>>>>>Can anyone help me with a quick code to do this?
>>>>>>
>>>>>>Thanks in advance.
>>>>>>
>>>>>>Brad.
>>>>>
>>>>>Is this field a numeric field or char field?
>>>>>
>>>>>Jeff
>>>>
>>>>The part number is a character field and the length is numeric.
>>>
>>>Simplitic way
>>>
>>>select table1
>>>locate
>>>scan for at('2479',partnofield)0
>>> replace lenfield with lenfield+4
>>>endscan
>>>
>>>
>>>HTH
>>>Jeff
>>
>>Thanks Jeff that did it!
>>
>>I do very little programming and am working on learning more. Stuff like this is very helpful.
>>
>>Brad.
>
>even more simplistic
>
>select table1
>replace lenfield with lenfield+4 all for like( '*2479*, partnofield)
>
>Paul


Thanks Paul, every little shortcut helps!

Brad.
He is there and He is not Silent.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform