I did this sort of thing for users in (or not in) roles... the result is two query objects ones that are in the target role and those that are not...like this:

i1 = targetrole.getuserIterator();
q1 = i1.getQuery();
vl = valuelist(q1.userid);
gw = request.reactor.createGateway("user");
q2 = gw.createQuery();
if(q1.recordcount gt 0)
{
q2.getWhere().isNotIn("user","userid",vl);
}
qryNOTSelecteduser = gw.getByQuery(q2);
qrySelecteduser = q1;



David A. Cheslow PhD
Saturna Software Systems - http://www.saturnasoftware.com
BOX 190
SATURNA ISLAND BC  V0N 2Y0
CANADA

(250) 539-3703



On Aug 9, 2006, at 2:15 PM, Ryan Guill wrote:

I dont know how you would do it in reactor, but this may help you find
it, you could rewrite that query with an exception join:

Select appUser.*
from AppUser
Exception Join training
on userid = userid



On 8/9/06, Brad Haas <[EMAIL PROTECTED]> wrote:


How would I do this in Reactor:

SELECT AppUser.*
FROM AppUser
WHERE UserID NOT IN
 (SELECT UserID
 FROM Training)


I suspect you'd use some type of outer join, but could someone show me some
reactor code how to accomplish this?

Thanks,
Brad




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
Archives at:
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --


-- 
Ryan Guill
A Deep Blue
www.ryanguill.com
(270) 217.2399
got google talk?  Chat me at [EMAIL PROTECTED]

Use CF and SQL? Try qBrowser - http://www.ryanguill.com/docs/

www.ryanguill.com/
The Roman Empire: www.ryanguill.com/blog/


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --





-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to