Hello, I am studying the possible
migration of a system using another database engine to MySQL for various
reasons. However, I have several instances of the following query spread
throughout my application that do not work in mysql. The query is: Select count(*) from
customer where customer.id in (select customer.id where customer.status=’A’ and
customer.id = customer.opt_id MINUS select vendor.id from vendor) The error I receive is
Error Code 1064, DB Error State = 42000 indicating an error in my SQL syntax. I
checked the documentation and found that for mysql the SET MEMBERSHIP CLAUSE
(IN) can only accept lists made of constants. However, my SQL reference shows
this query as a valid SQL2 type query. I have two questions: 1.
Can anyone tell me why is this query returning an error in
mysql? 2.
Can anyone suggest a way to write this query in a mysql
friendly way? TIA Jaime ----------------------------------------------------------------- Jaime
J. Maiz
630 979 2088 mailto:[EMAIL PROTECTED] IH 4F-310 |
- Re: How to perform the following Query in MySQL Jaime J. Maiz
- Re: How to perform the following Query in MySQL Becoming Digital
- RE: How to perform the following Query in MySQL Jaime J. Maiz