General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Rip
APPEND FROM DELIM may work depending on what your data delimiter between fields is is.
However I often do it the following way.
First I create a table with 1 very long field (longfld) in it big enough to contain all the fields in your textfile.
Then do
APPEND FROM MYTEXTFILE.TXT SDF
Now all you data is in a table but its all in the one field so all you have to do is add your own field names to the structure and then something like the following
REPLACE all NAME with SUBS(LongFld,1,10), Address1 with SUBS(Longfld,11,20)
etc etc You get the idea
Hope this helps
>I have a dbf table with no records and it's structure matches a fixed width text file. Meaning, for example, if field1 is a c(6) and field2 is a c(10) then, in the text file, columns 1-6 are field1 and columns 7-17 are field2.
>
>What would be the best way to import this data?
>
>TIA
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only