>I am receive my data in a text file in the following format:
>"5365-00-384-6859","SPACER","","EA|EA","1.50|1.50"
>
>Is there a way I can upload this data into a table. It appears that the brackets are causing a problem when I am uploading using the typical:
>appen from myfile.txt type sdf delimited
Ok Jeffrey -
i read all of your stuff -
i suggest a two table approach .
first table has the input structure from your raw ascii file, so use
append from myfile.txt type CSV to get the data.
second table would look just like the first one, but would have
the proper field type and size for the two data elements that contain the PIPE bar |
then after first table is filled,
do scan..endscan on the first table ...
similar to
scatter memvar
lnpos = iif(occurs("|",m.unit),at("|",m.unit)-1, len(m.unit)) && i may have the params backwards
m.unit = substr(m.unit,1,lnpos
lnpos = iif(occurs("|", m.price),at("|",m.price)-1, len(m.price))
m.price = val(substr(m.price,1,lnpos))
insert into tabletwo from memvar
*--
this would clean up your data, and NOT worry about the size of the
proper UNIT of Measure NAME or the price.
lemme know how that works out for you .
mondo regards [Bill]
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement