Hi guys,

Since getting help on my last problem which was finding records of  
users (from user table) which have events in the events table I am  
now trying to list all the users in the users table which don't have  
any rows which match in the events table.

<cfquery name="GetPromoters" datasource="user020">
SELECT
        u.userID,
        u.firstName,
        u.lastName,
        u.emailAddress,
        u.password,
        e.userID
FROM
        tbl_020publicUsers u INNER JOIN tbl_020eventDetails e
        ON u.userID <> e.userID
</cfquery>

I thought something like the above might work but doesn't seem to.

Any help would be great, thanks.

Saturday

I suspect the other suggestions would work, but since we originally went the 
inner join rout why not do the outer join route which is designed for this 
purpose.

<cfquery name="GetPromoters" datasource="user020">
SELECT
        u.userID,
        u.firstName,
        u.lastName,
        u.emailAddress,
        u.password,
        e.userID
FROM
        tbl_020publicUsers u LEFT OUTER JOIN tbl_020eventDetails e
        ON u.userID = e.userID
        AND e.userID IS NULL
</cfquery>

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222983
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to