[wellylug] curly csv formatting

Mark Signal mark at databackup.co.nz
Fri Jul 9 11:21:02 NZST 2004


Hi

I have to provide a client with a filtered data dump of an old paradox
database so that they can import the data into their new sap database. I
have dumped the filtered data into a csv file (110,000 lines) and formatted
it using my clutsy perl scripting.

The problem is that I am stuck with this one final requirement....

the csv layout is now as follows:

surname,firstname(s),date of birth, 1st qualification, various qualification
details
,       ,           ,             , 2nd qualification, various qualification
details
,       ,           ,             , 3rd qualification, various qualification
details
,       ,           ,             , 4th qualification, various qualification
details
..and so one until it gets to the next new client..

what I need to do is fill in the name/dob details on all the subsequent
lines until it gets to the next new client details.
Logic something like .. if the space between these 2 commas is empty then
copy the details on the same space on the line above...

any pointers greatly appreciated

cheers

Mark Signal
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.712 / Virus Database: 468 - Release Date: 27/06/2004




More information about the wellylug mailing list