Hey,

I'm not good at arrays and could use some help.  I'm 
trying to import a *.csv file with three columns into
a table.  The csv file look like ...

Donna Jackson,[EMAIL PROTECTED] Drew Corporation,
Douglas Car,[EMAIL PROTECTED] Drew Corporation,

Here's what I have for code so far ...

1) Should I be adding to an 3 dimensional array as I 
loop through the list?
2) How do I reference each element in the array for the 
insert?

<CFSET emailtext=ArrayNew(1)>

<!--- READ FILE FROM FILE SYSTEM --->
<CFFILE ACTION="Read"
          FILE="C:\email_lista2.csv"
        VARIABLE="emailtext">

<!--- REPLACE THE COMMA WITH A BLANK --->
<CFLOOP INDEX="fred" LIST="#ReplaceList
(emailtext, ",", "")#" delimiters="">

<!--- INSERT INTO TABLE --->
<CFQUERY NAME="insrt" datasource="#datasource#">
        insert into Email
           (
                email_address,
                email_name,
                email_company,
                )
                values
                (
                '#VALUE_COLUMN1#',
                '#VALUE_COLUMN2#',
                '#VALUE_COLUMN3#'
</cfquery>

</CFLOOP>


Thank you in advance.

D-
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to