<cfif> ;-)

Michael Traher 


-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED] 
Sent: 18 September 2003 15:36
To: CF-Talk
Subject: re" <cfquery INSERT into SQL database

Hi,

Below is my INSERT inside of a loop. Everything is working just fine. I
would like to know how I can exclude certain "var" in my SQL statement.

If the "var" is equal to something then don't insert. Like a WHERE?


WHERE var NEQ 'xxx' OR 'yyy' OR 'zzz'

How can I add that sort of syntax to my SQL?


<cfloop list="#ListLoop#" Index="Line" Delimiters="#strCR#">

                        <cfquery name="update" DATASOURCE="database">
                                INSERT INTO strfields
                                (
                                        var,
                                        destination
                                )
                                VALUES
                                (
                                        <cfqueryparam
value="#ListGetAt(Line,1,'|')#" cfsqltype="CF_SQL_LONGVARCHAR">,
                                        <cfqueryparam
value="#ListGetAt(Line,2,'|')#" cfsqltype="CF_SQL_LONGVARCHAR">
                                )
                        </cfquery>


</cfloop>





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137496
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to