Simply put... You'll need to put something in the empty fields one way or another.
If not before it's pulled in as a query structure, then you'll have to bring it in as a string and fix the empty values. Replace 'tab tab' with 'tab null tab' Replace 'chr(13)chr(10) tab' with 'chr(13)chr(10) null tab' Replace 'tab chr(13)chr(10)' with 'tab nullchr(13)chr(10)' (I think that would cover all the possible empties.) (no spaces of course) Then put it in a query structure And you could treat it as a nested tab delimited list inside a chr(13)chr(10) delimited list and replace empty list items with whatever you wanted Then put it in a query structure Messy? Yes. Huge lists usually are. The best thing to do would be to fix it before it is read in. -----Original Message----- From: David Critchley [mailto:[EMAIL PROTECTED] Sent: Thursday, May 05, 2005 4:42 PM To: CF-Talk Subject: CFHTTP problem No suggestions on this one? > I am trying to extract data from a textfile database, using <CFHTTP>. > The problem I am running into is that there are null fields in the > textfile database and CFHTTP is then counting two fields as one (tab > seperated). For example, in my textfile there will be something like > this: > > field1 field2 field3 > data data data > data data > data data data > > I am getting an Incorrect number of columns error, because coldfusion > is missing the null field and counting only 2 fields for the second > row of data. Has anyone else come accross this, or have any > suggestions? I have considered using the replace function on the > variable and replacing all double tabs with a tab<space>tab. But this > to me seems like a poor work around. > > I am using <CFHTTP url="#pathtofile#" columns="field1,field2,field3" > firstrowasheaders="yes" delimiter="tab"></CFHTTP> > > David Critchley ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205817 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54