Hi guys I'm in urgent need of help.
I have a column in my table that collects lists(UserGroup), but I want to compare individual list items in Usergroup(Qry1) with individual list items in UserGroup(Qry2).
<CFQUERY NAME="Qry1" DATASOURCE="#db#"> SELECT UserID, UserGroup FROM users WHERE usersid = #SESSION.userID# </CFQUERY> <CFQUERY NAME="Qry2" DATASOURCE="#db#"> SELECT UserID, UserGroup FROM users WHERE usersgroup IN (#Qry1.usergroup#) </CFQUERY>
What I am trying to do is compare individual list items in usergroup with each other thus why the sql IN function will not work.
if Qry1 Usergroup equals 21, 15,17
and Qry2 Users/Usergroup:
Then John and Sarah will be retrieved by Qry2
Pleasae, any help will be very much apreciated