Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline

610 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