Note: You must be registered in order to post a reply. To register, click here. Registration is FREE! Before posting, make sure you have read this topic!
T O P I C R E V I E W
Jorrit787
Posted - 26 July 2009 : 13:12:12 I have a table in my Access DB that contains a field with lists of comma-delimited usergroup IDs. How can I select only those records in which the usergroup ID of the current user does not appear in the list of usergroup IDs in the database?
Something like this doesn't work:
SELECT * FROM TABLE WHERE " & m_usergroup & " NOT IN exclude_usergroups"
m_usergroup in this case could be "4", and a particular record could have an exclude_usergroups field value of "1,2,5,6".
4 L A T E S T R E P L I E S (Newest First)
HuwR
Posted - 28 December 2009 : 02:38:46 try SELECT * FROM TABLE WHERE '" & m_usergroup & "' NOT IN (exclude_usergroups)"
Jorrit787
Posted - 28 December 2009 : 00:07:43 So, late response, but better late than never, right?
I tried your suggestion Huw, but I get this error:
Microsoft JET Database Engine error '80040e14'
In operator without () in query expression 'sectionid=103 AND '0' NOT IN usergroup'.
HuwR
Posted - 26 July 2009 : 16:33:22 you need to do
SELECT * FROM TABLE WHERE '" & m_usergroup & "' NOT IN exclude_usergroups"
ruirib
Posted - 26 July 2009 : 16:21:45 What is the table that has the usergroups to be exclused?