Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Query help

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!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

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?

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.07