This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BFA0CF.9CA2C290
Content-Type: text/plain;
        charset="iso-8859-1"

Howie,

I never would have thought to use the listgetat function.  Thank you so
much!!

Laura

------Original Message------------
Date: Fri, 7 Apr 2000 15:59:37 -0400
From: "Howie Hamlin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: CFLoop w/Insert Into??
Message-ID: <01fa01bfa0cb$d0be4940$[EMAIL PROTECTED]>

You are doing multiple inserts so you should do multiple queries...

Try something like:

<cfset listregion = "Africa,Africa,Africa">
<cfset Cats = "5, 10, 15">
<cfset listmonth = "May, May, May">

<cfloop index="loopinx" from="1" to="#listlen(listregion)#">
   <cfquery  datasource="GOE">
     INSERT INTO Testgoe(Region, ExpenseID);
     VALUES ('#listgetat(listregion,loopinx)#', #listgetat(cats,loopinx)#)
   </cfquery>
</cfloop>


Laura


------_=_NextPart_001_01BFA0CF.9CA2C290
Content-Type: text/html;
        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2651.75">
<TITLE>Re: CFLoop w/Insert Into??</TITLE>
</HEAD>
<BODY>

<P><FONT COLOR="#000080" FACE="Arial Narrow">Howie,</FONT>
</P>

<P><FONT COLOR="#000080" FACE="Arial Narrow">I never would have thought to use the 
listgetat function.&nbsp; Thank you so much!!</FONT>
</P>

<P><FONT COLOR="#000080" FACE="Arial Narrow">Laura</FONT>
</P>

<P><FONT COLOR="#000080" FACE="Arial Narrow">------Original Message------------</FONT>
<BR><FONT SIZE=2 FACE="Courier New">Date: Fri, 7 Apr 2000 15:59:37 -0400</FONT>
<BR><FONT SIZE=2 FACE="Courier New">From: &quot;Howie Hamlin&quot; 
&lt;[EMAIL PROTECTED]&gt;</FONT>
<BR><FONT SIZE=2 FACE="Courier New">To: &lt;[EMAIL PROTECTED]&gt;</FONT>
<BR><FONT SIZE=2 FACE="Courier New">Subject: Re: CFLoop w/Insert Into??</FONT>
<BR><FONT SIZE=2 FACE="Courier New">Message-ID: 
&lt;01fa01bfa0cb$d0be4940$[EMAIL PROTECTED]&gt;</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">You are doing multiple inserts so you should do 
multiple queries...</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Try something like:</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">&lt;cfset listregion = 
&quot;Africa,Africa,Africa&quot;&gt;</FONT>
<BR><FONT SIZE=2 FACE="Courier New">&lt;cfset Cats = &quot;5, 10, 15&quot;&gt;</FONT>
<BR><FONT SIZE=2 FACE="Courier New">&lt;cfset listmonth = &quot;May, May, 
May&quot;&gt;</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">&lt;cfloop index=&quot;loopinx&quot; 
from=&quot;1&quot; to=&quot;#listlen(listregion)#&quot;&gt;</FONT>
<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp; &lt;cfquery&nbsp; 
datasource=&quot;GOE&quot;&gt;</FONT>
<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO 
Testgoe(Region, ExpenseID);</FONT>
<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp; VALUES 
('#listgetat(listregion,loopinx)#', #listgetat(cats,loopinx)#)</FONT>
<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp; &lt;/cfquery&gt;</FONT>
<BR><FONT SIZE=2 FACE="Courier New">&lt;/cfloop&gt;</FONT>
</P>
<BR>

<P><B><I><FONT COLOR="#800080" SIZE=2 FACE="Arial">Laura</FONT></I></B><I></I>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01BFA0CF.9CA2C290--
------------------------------------------------------------------------------
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.

Reply via email to