Any ideas on parsing this from a flat text file (.txt) into a database
(assuming row one in file is column name?).
Sample data:
SUPPLIER|CAT.|PRODUCT-CODE|DESCRIPTIONS|LQ|MQ|HQ|LQ-PRICE|MQ-PRICE|HQ-PRICE|
RRP(INC-TAX)|STOCK|WEIGHT|G-CODE
4KUS |CD|CCD-52X6D |52X CD-ROM DRIVE RETAIL PACK
|9|19|999|16.7|16.6|16.5|23.99|YES|1|09013
4KUS |MO|CDR-7S52
|INT.CRW,52xCDR,32xCDRW,52xCD-READ,NERO5.5,SMART-BURN/X,VAS
|9|19|49|31|30.75|30.5|44.99|YES|1|14392
As you can see the end of the row is not "terminated" and the usual
delimiter of the comma "," is used within certain fields so bugger the easy
parsing using the CFML default comma.
I am assuming the the COLUMN NAMES are not valid and would have to be
tweaked on the fly (that is easy).
I am also assuming that ALL fields are populated although NULL data could be
accepted.
I have done similar conversions only recently but with a known delimiter.
Any ideas on the most efficient way to do this using ColdFusion MX 6.x.?
Please?
Regards,
Peter Tilbrook
Director, ColdGen Internet Solutions
Manager, ACT and Region ColdFusion Users Group
Director of Technology, Global Information Exchange
4/73 Tharwa Road
Queanbeyan, NSW, 2620
AUSTRALIA
WWW 1: http://www.coldgen.com/
WWW 2: http://www.actcfug.com/
Telephone: +61-2-6284-2727
E-mail: [EMAIL PROTECTED]
>>
All of my external emails are scanned for viruses using the latest available
Norton AV signatures. Also I do NOT maintain an Address book or Contact list
to minimise the risk of infecting recipients of my messages for viruses. I
also prefer "plain text" emails for speed and efficiency.
Powered by Lookout:
Lookout is lightning-fast search for your email, files, and desktop works
with Microsoft Outlook.
http://www.lookoutsoft.com/Lookout/
>>
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/