RE: Get everything between in a CSV file.
Theres a custom tag that might be of use to you, CFX_CSVToQuery takes a CSV file and converts it into a query object for you.. It handles commas in HTH -Original Message- From: Tracy Bost [mailto:[EMAIL PROTECTED]] Sent: 21 February 2002 22:40 To: CF-Talk Subject: Get everything between in a CSV file. Can someone help me out here. I have a cvs file being uploaded and am having trouble with one of the fields. It a field that *can* contain comments and therefore have a comma in it. I'm dumping it into the database and everything is hunky dorie until a comma is put in the comment field. I notice the csv file puts this field like this This is a comment, and another comment,and another... I would like to find all commas between the two and temporarily change the commas to something else so it doesn't think its another field... Using the ListChangeDelims function doesn't get it because it changes those commas in the comment also. Thanks, - Tracy -- Visit The Most Powerful Tool on the Farm at http://www.ifarm.com Get the latest on Ag News, Market Reports, FREE email, and much more. __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get everything between in a CSV file.
text,text,dumb,text Change , to ~. Change the independent commas, then change ~ back to ,. -Original Message- From: Tracy Bost [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 5:40 PM To: CF-Talk Subject: Get everything between in a CSV file. Can someone help me out here. I have a cvs file being uploaded and am having trouble with one of the fields. It a field that *can* contain comments and therefore have a comma in it. I'm dumping it into the database and everything is hunky dorie until a comma is put in the comment field. I notice the csv file puts this field like this This is a comment, and another comment,and another... I would like to find all commas between the two and temporarily change the commas to something else so it doesn't think its another field... __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get everything between in a CSV file.
Thanks. I'll check it out. I got it working last night. Its ugly, but it works. Quoting Mike Townend [EMAIL PROTECTED]: Theres a custom tag that might be of use to you, CFX_CSVToQuery takes a CSV file and converts it into a query object for you.. It handles comma s in HTH -Original Message- From: Tracy Bost [mailto:[EMAIL PROTECTED]] Sent: 21 February 2002 22:40 To: CF-Talk Subject: Get everything between in a CSV file. Can someone help me out here. I have a cvs file being uploaded and am having trouble with one of the fields. It a field that *can* contain comments and therefore have a comma in it. I'm dumping it into the database and everything is hunky dorie until a comma is put in the comment field. I notice the csv file puts this field like this This is a comment, and another comment,and another... I would like to find all commas between the two and temporarily change the commas to something else so it doesn't think its another field... Using the ListChangeDelims function doesn't get it because it changes those commas in the comment also. Thanks, - Tracy --- - -- Visit The Most Powerful Tool on the Farm at http://www.ifarm.com Get the latest on Ag News, Market Reports, FREE email, and much more. __ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get everything between in a CSV file.
I think you might have to use a regex on it first. Find everything between first, and replace the comma's with something else, maybe a period or something. I'll look around and see if I can find a better way to do it. _ steve oliver senior internet developer atnet solutions, inc. http://www.atnetsolutions.com -Original Message- From: Tracy Bost [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 5:40 PM To: CF-Talk Subject: Get everything between in a CSV file. Can someone help me out here. I have a cvs file being uploaded and am having trouble with one of the fields. It a field that *can* contain comments and therefore have a comma in it. I'm dumping it into the database and everything is hunky dorie until a comma is put in the comment field. I notice the csv file puts this field like this This is a comment, and another comment,and another... I would like to find all commas between the two and temporarily change the commas to something else so it doesn't think its another field... Using the ListChangeDelims function doesn't get it because it changes those commas in the comment also. Thanks, - Tracy -- Visit The Most Powerful Tool on the Farm at http://www.ifarm.com Get the latest on Ag News, Market Reports, FREE email, and much more. __ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists