Thursday, 19 September 2013

#1241 - Operand should contain 1 column(s) IN

#1241 - Operand should contain 1 column(s) IN

i have a problem with mysql 5.6 version. Sorry if my english sucks, and
sorry if the format is not the right one, im in a hurry.
Mysql throws me this error "#1241 - Operand should contain 1 column(s)"
from this query:
SELECT DISTINCT (P.`P_nombre`, P.`P_raza`)
FROM `Perros` AS P,
`Adiestramientos` as A
WHERE P.`P_codigo` = A.`P_codigo` AND A.`A_nroLegajo` = '1500'
AND P.`P_codigo` NOT IN(
SELECT A.`P_codigo`
FROM `Adiestramientos` as A
WHERE A.`A_nroLegajo`= '4600'
)
It seems to work fine on Mysql 5.0, the problem seems to be on the IN
operator
Hope you can help me.
Thanks!

No comments:

Post a Comment