It might be useful to know that you can reference query objects like a
struct of arrays: QueryName['ColumnName'][1]
So....
<cfset ColNameA = "col1">
<cfset ColNameB = "col2">
<cfloop query="QueryName">
<cfif QueryName[ColNameA][QueryName.CurrentRow] EQ QueryName[ColNameA][
QueryName.CurrentRow]>
<!--- Perform actions for non-unique actions --->
</cfif>
</cfloop>
This might be something that would be accomplished better in the SQL
statement though. A more specific description of the issue would be
helpful.
On Thu, Feb 28, 2008 at 3:16 PM, Richard White <[EMAIL PROTECTED]> wrote:
> hi,
>
> i know there must be a simple answer to this but i am braindead right now
> and cannot think of it. this is more of a logic question, and i am lacking
> it right now :) i would appreciate your help please
>
> i have data in a query, e.g.
>
> col1 col2 col3
> -------------------
> 1 2 3
> 1 2 4
> 1 3 1
> etc....
>
> i need to be able to check that no 2 rows have the same data
> the problem is, is that i dont know how many columns there will be and i
> dont know what the unique columns will be. but i have the query and i have
> an array of unique columns
>
> for example i have 'col1' and 'col2' in an array called uniqueColumns()
>
> so i need to somehow search through the query to ensure that no 2 rows
> contain the same data - but only in the unique columns.
>
> so on the above example if i did have col1 and col2 in the uniqueColumns
> array then when searching through the query i need it to tell me that row 1
> and 2 have matching unique columns as they both contain:
>
> col1 = 1
> col2 = 2
>
> i would be very grateful of your help
>
> thanks
>
> richard
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300115
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4