I think you need to look at the evaluate function.

Assuming PID and Critical_Path_Dates are 2 queries, try

dateCompare(#evaluate("PID.#field_names#")#,#evaluate("Critical_Path_Dates.#
field_names#)#)


-----Original Message-----
From: Stewart McGowan [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 01, 2000 9:01 AM
To: CF-Talk
Subject: Field Compare


Hi Guys,

I want to compare one row of a table against another row in that table 
(the row has an ID and 20 or so date fields)

I retrieve the specific rows i want, then i want to do a date compare 
so i set up a list of field names


<CFSET field_names="blah blah">

<!--- i then loop over the field names --->
<CFLOOP index="Field_names" list="#Field_names#" delimiters=",">

<!--- and do the comparison --->
<CFSET comparison = DateCompare(
#PID.Field_names#,#Critical_Path_Dates.Field_names#>
<CFOUTPUT>#Comparison#</CFOUTPUT>
</CFLOOP>

of course this won't work, the question is;

How can i use the list of field names with the query name?

Any help, is as always, appreciated.

Stew
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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