?
Solved

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

Posted on 2011-03-17
2
Medium Priority
?
286 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

764 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