Hi Nicole, I think that this should work: select userroles, 'Roles' from userroles where roles_id in | (select roles_id from cmtuser_role where cmtuser_id in | (select user_id from users where username = ?)) The innermost subselect queries the user ids for a username (can be only one or zero), the outer subselect queries the role ids for this user id, and for those role ids the role names are queried. Hope that the statement reflects your table structure ;-).
Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230006#4230006 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230006 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user