Combine the columns using an alias and query for DISTINCT?

-----Original Message-----
From: Richard White [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 28, 2008 3:16 PM
To: CF-Talk
Subject: comparing data in a loop


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:300117
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