J
JJ
Someone suggested Access as a middleman to get CSV files into FoxPro
quicky.
E.G. I have a 287,218 record CSV (Comma Delimited Value) file and am
not familiar with the maximum length of any of the fields. In this
case there are 20 fields, but I wouldn't always know that without
counting them.
My goal is to get this into a FoxPro .dbf.
Excel can't open this size file in its entirety.
Someone suggested using MS Access.
I could use FoxPro, it can't "IMPORT" a CSV file, only APPEND.
In FoxPro I would have to:
1) determine how many fields are needed (there are 20)
2) making sure each field is long enough to accomodate whatever length
data may be found in the CSV file etc.
3) create the FoxPro table
4) Do the actual append
Though I know very little about Access it was easy enough to create a
..mdb from the .CSV file, but it set the field lengths to 250 for all
fields.
At this point I figured I would give up and export to dBase IV, then
use FoxPro to whittle down the field sizes, but Access Export says
Field will not fit in record. There are 20 250 character fields and
287,218 records.
Is there a function in Access to automatically adjust the field
lengths to the minimum required length for each field based on the
actual data in the table,
either
at time of import from the CSV
or
after the fact ?
John "J.J." Jackson
quicky.
E.G. I have a 287,218 record CSV (Comma Delimited Value) file and am
not familiar with the maximum length of any of the fields. In this
case there are 20 fields, but I wouldn't always know that without
counting them.
My goal is to get this into a FoxPro .dbf.
Excel can't open this size file in its entirety.
Someone suggested using MS Access.
I could use FoxPro, it can't "IMPORT" a CSV file, only APPEND.
In FoxPro I would have to:
1) determine how many fields are needed (there are 20)
2) making sure each field is long enough to accomodate whatever length
data may be found in the CSV file etc.
3) create the FoxPro table
4) Do the actual append
Though I know very little about Access it was easy enough to create a
..mdb from the .CSV file, but it set the field lengths to 250 for all
fields.
At this point I figured I would give up and export to dBase IV, then
use FoxPro to whittle down the field sizes, but Access Export says
Field will not fit in record. There are 20 250 character fields and
287,218 records.
Is there a function in Access to automatically adjust the field
lengths to the minimum required length for each field based on the
actual data in the table,
either
at time of import from the CSV
or
after the fact ?
John "J.J." Jackson