Please help with SQL syntax

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
 
S

Sylvain Lafontaine

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

Top