Please help with SQL syntax

  • Thread starter Thread starter Aleks
  • Start date Start date
A

Aleks

I am trying not to select records if they are IN a comma delimited session
variable, it works fine If I want to select the ones IN, but not the other
way around:

Select * from users
where Users.UserId NOT IN (1,2,3,4,5)


Is this correct ? how should I change it to make it work ?

Thanks for the help !

Aleks
 
Your example is perfectly OK, so the reason for your problem must be
something else.

S. L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

One or the other... 4
How do I add apostrof to the sql select 2
Deleting Records 2
How to use case in sql select 3
sql question 2
SQL syntax help please 6
SQL Syntax problem 4
Please help with sql. 2

Back
Top