Chris,

I haven't checked the syntax of this code, but try turning one query 
into a list: 

<cfset qcfGetOldContactInfo = valuelist
(qcfGetOldContactInfo.mainContactName )>

Then use

<cfoutput query="qcfGetContactNames">
  <cfif ListFind(qcfGetOldContactInfo, FullName) is not 0>
    There is a matching record
  <cfelse>
    No matching Records
  </cfif><br>
</cfoutput>

Fiachra


Hi everyone.  I am trying to loop over the results of a query, and 
match the
names from that query with the names from another query.  Here's what 
it
look like:

<cfloop query="qcfGetContactNames">

<cfif qcfGetOldContactInfo.mainContactName is 
qcfGetContactNames.FullName>
<cfoutput>
<table>
<tr>
<td>#qcfGetContactNames.FullName# #mainContactTitle#
#mainContactEmail#</td>
</tr>

</table>
</cfoutput>
</cfif>


</cfloop>

The two queries look like this:
<cfquery name="qcfGetContactNames" datasource="FSLibrary_Dev">
SELECT EventContactFirstName+' '+EventContactLastName as FullName
 FROM dbo.tbl_EP_EventContacts
ORDER BY EventContactFirstName Asc
</cfquery>

<cfquery name="qcfGetOldContactInfo" datasource="FSLibrary_Dev">
SELECT mainContactName, mainContactTitle, mainContactAreaCode,
mainContactPhone, mainContactFaxAreaCode, mainContactFax, 
mainContactEmail
 FROM dbo.tblIndustryEvents
ORDER BY mainContactName Asc
</cfquery>

I keep getting no records matching, but I know that the names match, 
because
the names from the first query where pulled from the database in the 
second
query, separated, and added.  So the names are exactly the same.  Any 
ideas?

Thanks in advance,

Chris Martin
www.fsenablers.com
www.fslink.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


_____________________________________

Get your free E-mail at http://www.ireland.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to