Need Help - extract unstructured data for parse reformat and import into DB
| From: | Sophia Morgan | Date: | Mon, 02 Feb 2004 20:13:29 +0000 |
| Subject: | Need Help - extract unstructured data for parse reformat and import into DB | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-176608@lists.php.net to get a copy of this message | ||
I need to get some guidance on a project. I have to extract unstructured data from a .CSV file and
reformat the data to import into MSSQL.
The unstructured data is basically in some kind of sub summary report. Note: the files will include
a range from 1 to 12 months of information (month to date). Four different .CSV files would need to
be reformatted at the same time. The file size for one is about 1.7 MB and containing roughly around
21,115 rows of data in each.
Would PHP be a good program to use for this project? Has anyone had to reformat unstructured data to
insert into a database? If anyone has any suggestions or examples please let me know. J
I was thinking about importing the data into an array then parsing through the information with
multiple if statements then using SQL to insert the data into a database. This will be my first PHP
parse project so any examples and suggestions to get me started would be greatly appreciated. A
small sample of the data structure is below:
Thank You,
Sophia
sophiam@mac.com
/WCS37 /WCS9 /WCS9 WCS9
RETAIL REGIS PAG E1
VEHIC LE TYPE CAR &T
AREA: PLACE
MONTH MONTH MONTH
OCT. SEP. AUG
2003 2003 2003
GROUP MAK MDL
----- --- --- ----- ----- -----
SPTY COUP AU RSX 3 4 8
CCT CAR FORD FC 4 1 7
REPORT DATE: 1/12/01
RETAIL REGIS PAG E1
VEHIC LE TYPE CAR &T
AREA: PLACE2
MONTH MONTH MONTH
OCT. SEP. AUG
2003 2003 2003
GROUP MAK MDL
----- --- --- ----- ----- -----
SPTY COUP AU RSX 1 7 3
CCT CAR FORD FC 2 2 5
REPORT DATE: 1/12/01