Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Formatting
Message
 
À
29/03/2004 14:27:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00890388
Message ID:
00890565
Vues:
24
Then the problem is not related to the append command. Append works properly appending file contents as it is. And because it contains "EA|EA", the value is inserted as is.

The solutions could be (each has limitations, inconveniences, etc.., so choose what is more appropriate for you):
- make the file contents proper
- limit the field length to 2 for "EA|EA"
- limit the field length to 3 for "1.50|1.50"
- make field type N(5,2) for "1.50|1.50"
- after append run replace command, like:

repl field_EA with left(field_EA ,at("|",field_EA)-1) for "|"$field_EA

- other solutions may go here


>Here is what is in the file. Keep in mind there are more lines of data similar to this format:
>
>"5365-00-384-6859","SPACER","","EA|EA","1.50|1.50"
>
>After I append the text file the table looks like this:
>
>nsn field: 5365-00-384-6859
>desc field: SPACER
>unit of issue field: EA|EA
>Price field: 1.50|1.50
>
>The correct format should be:
>
>nsn field: 5365-00-384-6859
>desc field: SPACER
>unit of issue field: EA
>Price field: 1.50
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform