hmm, so how I only get back unique rows across the join.
here is ma query.
<cfquery name="get_reg" datasource="recruitment2" blockfactor="100">
SELECT *
FROM users_address, users_cats UC, distinct_users_EB EB,
distinct_users_fields UF
WHERE UC.UID = users_address.UID
AND EB.UID = users_address.UID
AND UF.UID = users_address.UID
<cfif form.field neq "">
AND UF.fieldID = #form.field#
</cfif>
<cfif form.jobcat neq "">
AND UC.catID = #form.jobcat#
</cfif>
<cfif form.ebasis neq "">
AND EB.EBID = #form.ebasis#
</cfif>
<cfif form.salary neq "">
AND users_address.sal = '#form.salary#'
</cfif>
ORDER BY NAME_TWO
</cfquery>
-----Original Message-----
From: Tom Smith [mailto:[EMAIL PROTECTED]]
Sent: 05 December 2002 16:14
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] distinct
it put the rows together at this point for the distinct... the results are
correct....
----- Original Message -----
From: "Russ 'Snake' Michaels" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 3:48 PM
Subject: [ cf-dev ] distinct
> I am sure this is weird, but correct me if I am wrong.
>
> I have lookup tables like this
>
> USERID, OTHERID
>
> both columns will have multiple copies of values.
> e.g
>
> 1,2
> 1,3
> 1,4
> 2,2
> 2,4
>
> I need to get back only distinct UDERID's
>
> so a select distinct USERID from table
>
> works fine
> but as I also need the other column, when I add select DISTINCR USERID,
> OTHERID
> I get multiple rows containing the same USERID back again
>
> what's up with that
>
> /Russ
>
>
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]