Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append From?
Message
De
04/01/2000 10:10:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00312401
Message ID:
00312416
Vues:
29
>I am looking for a way to mimic the way "Append From" works with a comma delimited file, but instead of reading a text file, I am being passed a single string in this format.
>
>In other words, if I am passed a string that looks like this:
>"1234,'ABCDE',678,'FGH'"
>
>What's the easiest way to break up that string into the appropriate fields of a table.
>
>
>The only way I can think of to accomplish this, without writing the parsing code myself, is to write the string to a text file then use the APPEND FROM command to read it back in. There must be an easy way that won't produce needless drive writes.
>
>Thanks

Could you make a cursor with the field format that is appropriate and then do a SQL insert into the cursor like this:

insert into mycursour fields (num1, chr1, num2, chr2) values (&mystring)

Not sure that would work, I haven't tested it yet, but its something to try...
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform