473,383 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Error to IN Operator with sub query

1
I have a problem to use IN Operator in MySQL. IN operator do not work with sub query. My syntax was
Expand|Select|Wrap|Line Numbers
  1. Select Id From Item Where Item.Id NOT IN (Select ItemId From salespricequot)
Display the error:
Expand|Select|Wrap|Line Numbers
  1. Error Code : 1064
  2. You have an error in your SQL syntax near 'Select ItemId From salespricequot)
please give me solution
Oct 23 '08 #1
5 2423
r035198x
13,262 8TB
Are you sure what you posted above is exactly the query you issued?
Oct 23 '08 #2
Atli
5,058 Expert 4TB
sksk.

Please use [code] tags when posting your code examples. (See How to ask a question)

[code=sql] ...SQL query goes here... [/code]

Thank you.
Moderator
Oct 23 '08 #3
Atli
5,058 Expert 4TB
What version of MySQL are you using?
Using subqueries with the IN function may not work on versions prior to version 5 (although the manual seems to include it for them...)
Oct 23 '08 #4
debasisdas
8,127 Expert 4TB
there is no reason why the query will throw error. Please check your table name and field name correctly.
Oct 24 '08 #5
mwasif
802 Expert 512MB
Using subqueries with the IN function may not work on versions prior to version 5 (although the manual seems to include it for them...)
These are supported prior to MySQL 5.
Oct 26 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
12
by: Amanda | last post by:
I have tried everything with this! I get an error stating "Index was outside the bounds of the array" My code looks like this.... xmlDoc = New XmlDocument() xmlDoc.Load("xml.doc") xslDoc...
4
by: khan | last post by:
getting, error, 3075 Syntax Error (Missing Operator) in query expression '8WHERE .=1' Dim TotalQty As Integer TotalQty = DLookup("", "", "=" & Forms!!)
1
by: washoetech | last post by:
Hello, I have a search box on my web app that I want to search several tables in my SQL 2000 DB. I have set up a full text catalog for indexing. The following Select statement works perfectly...
2
by: frbn | last post by:
hi all, we currently experience an original problem on a production server with a postgresql 7.1.3 ( a bit old, I know :\ ) We just want to know if somebody experienced this problem: the...
7
by: John Øllgård Jensen | last post by:
Hi Using MS Asccess 2000: In a query I'm trying to create a new field with following expression: FilmDate: Left(,4) The field "FilmNo" is another text field in the query. This is...
3
by: access baby | last post by:
I hava a date parameter filter query but it shows error Syntax error missing operator in query experssion can some one please help where am i going wrong in expression SELECT copyorderdtl * ...
2
by: sesling | last post by:
Our Database stores event messages in a table called eventnotifications. The table has a message type column. There are two types of messages (alert or info). I have created a form that includes a...
3
by: Margie | last post by:
Working on my database I use a modified piece of code gotten from thescripts. The code works perfectly except for one thing. When entering data containing the character ' , I get the error: Syntac...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.