> 
>Next I created a list from the first query:
> 
>
><CFOUTPUT query="GetRecord">
><CFSET list = "#GetRecord.MLS_number#">
></CFOUTPUT>
>

This code does NOT produce a list.  this only sets the list variable to the 
current record's MLS_number.  the correct code to create a list of all the 
MLS_numbers in the current recordset would be:

<cfloop query="GetRecord">
<cfset list=listappend(list,getrecord.MLS_number)>
</cfloop>

or equiv:

<cfset list=ValueList(GetRecord.MLS_number)>

>Then I tried to create a list of unprocessed listings from the other DB by
>comparing the  MLS_Number to the list:
> 
>
><CFQUERY name="GetResidential" dataSource="#DSN1#">
> SELECT MLS_Number
>FROM Residential
>WHERE List_Firm = #FirmID# AND MLS_Number NOT IN #list#
>ORDER BY MLS_Number
> </CFQUERY>
>

<CFQUERY name="GetResidential" dataSource="#DSN1#">
    SELECT MLS_Number
    FROM Residential
    WHERE List_Firm = <cfqueryparam cfsqltype="CF_SQL_INTEGER" 
value="#FirmID#"> AND MLS_Number NOT IN (<cfqueryparam cfsqltype="CF_SQL_CHAR" 
value="#list#">) 
    ORDER BY MLS_Number
</CFQUERY>


note the parens around the list.   also swapped you over to cfqueryparam syntax 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321352
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to