Solved

select varcharcolumn from table where varcharcolumn not in ('term1', 'term2', 'term3')

Posted on 2011-03-17
2
282 Views
Last Modified: 2012-05-11
select varcharcolumn from table where varcharcolumn not in ('term1', 'term2', 'term3')


is this the correct syntax for 'not in' for a 'varchar'
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
qasim_md earned 500 total points
ID: 35158828
Your Syntax is correct. If you are using the exact same SQL and getting error its is just that you are using table in your from it is a keyword so you will get an error

try this, this will not give an error:::

select varcharcolumn from [table] where varcharcolumn not in ('term1', 'term2', 'term3')

did that help ? let me know...
0
 

Author Closing Comment

by:rgb192
ID: 35159104
thanks
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question