Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attempting to Import Census Date into Fox Table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00832945
Message ID:
00833008
Vues:
24
Thanks Sergey,

This will be a huge help.

Jim


>Hi Jim,
>
>There're two types of the fixed lenght records in the file. The first character in each record is a record type field: 'H' record is 266 character length and 'P' record is 316 character length. The EOR delimiter is LF (CHR13) which is standard for Unix. VFP APPEND FROM command doesn't have a problem recognizing it.
>In the FTP directory you mentioned there's EXCEL spreadsheet 5%_PUMS_record_layout.xls with layout description for both types of record. Using that info you can create 2 tables, one for 'H' and another for 'P' records and than append records as follow
SELECT 0
>USE pr
>APPEND FROM (lcDir + "PUMS5_44.TXT") SDF ;
>	FOR rectype = "P"
>SELECT 0
>USE hu
>APPEND FROM (lcDir + "PUMS5_44.TXT") SDF ;
>	FOR rectype = "H"
>
In the future processing the 'H' and 'P' records can be linked by SerialNo' field.
>
>>I have been attempting to import recently released 2000 Census data (http://ftp2.census.gov/census_2000/datasets/PUMS/FivePercent/) into a Fox table. There seems to be no utility for importing text data in VFP 6 or 7. I have managed to import some of the smaller states into Access and export to a dBase IV file. However, Access seems to choke on the larger files. For example, the California data is in a text file that is in excess of 600MB and contains in excess of 3,000,000 records. Each record contains 165 fixed width fields, is 317 bytes wide, and has a funky End of Record delimiter. Access seems to choke on the size of the California data, whereas, it seems to handle files of < 500,000 records quite easily. My puter has 1GB of RAM and plenty of free hard drive to page. Any ideas as to how I might import this into Fox or Access or any other program so that I can ultimately get it into Fox? I have tried importing to SQL Server 2000. However, I can't get it to recognize the EOR
>>delimiter (Access does recognize the delimiter) and give me the proper record length.
>>
>>Any ideas??
>>TIA
>>Jim
Jim Finger
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform