Steve
Try something like this: (I haven't tested it but something like this should
work for you.
use cffile or cfhttp to get contents of your file.
<cfloop list="#filecontents#" index="record" delimiter="#Chr(10)#">
<cfquery datasource ="mydsn" name="qi_myrecord">
insert into mytable( myField1, myField1, myField1, myField1)
values (
<cfset nListLen = ListLen(record)>
<cfset x = 1>
<cfloop list="#record#" index="field">#field#
<cfif x NEQ nListLen>,</cfif>
</cfloop>
)
</cfquery>
</cfloop>
----- Original Message -----
From: "Steve Goldenberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 04, 2000 11:55 AM
Subject: Parsing a Comma Delimited file
> Dear CF gurus,
>
> Do any of you know an easy way to parse a Comma delimited text file in CF
to
> read records out for import into a database?
>
> Thanks for the help!
>
> -Steve Goldenberg
> Interfolio.com
> 4300 Old Dominion Dr.
> Suite 901
> Arlington, VA 22207
> p: 703.522.4004
> f: 209.315.7319
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.