Hi, Dave...

Yes, it is a tab-delimited file.  I've already been
manually importing several different documents into MySQL 5
using Navicat.  I've got the manual approach down pat, but
need to automate this part.

I did find this technique written up online from 2003, which
I'll try to incorporate into the solution.  (And I did try
using #record# instead of #hmls_offices#, but the entire file
was output again...)

<cfset bln_FirstLine = true>
<cfloop
list="#str_Content#"
delimiters="#chr(13)##chr(10)#"
index="str_Line">

<!--- Ignore the column name
line --->
<cfif bln_FirstLine is false>
<cfset str_Name =
listGetAt(str_Line, 1, ",")>
<cfset str_Phone =
listGetAt(str_Line, 2, ",")>
<cfset str_Email =
listGetAt(str_Line, 3, ",")>
<cfelse>
<cfset bln_FirstLine = false>
</cfif>
</cfloop>



> -----Original Message-----
> From: Dave Francis [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2008 10:02 PM
> To: CF-Talk
> Subject: RE: Trying to read a text file of data and input into db...
> 
> Off the top of my head, shouldn't it be <cfoutput>#record#</cfoutput>?
> And I know you said tab-delimited, but have you confirmed that it really
> is? ie what does listlen(list,Chr(09)) give you.
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308163
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to