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:137486
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

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to