query a list
Hello - I'm trying produce a list of records in a table where the last name does not equal items in a list. The code below creates a list like this: smith,jones,walsh,fox
Is it possible to then query the employee table to find all records whose lastname does not equal smith or jones or walsh or fox? If so, what is the best way to do that? Thanks very much.
<cfloop list="#form.LastName#" index="i">
<cfquery name="getNames" datasource="MyDB">
select LastName from Employee where LastName= '#i#'
</cfquery>
</cfloop>
