error instruccion sql en mysql
Hola compañeros, ten un problemilla con una instruccions sql, la instruccion es la siguiente:
SELECT pregunta, idtest
FROM preguntes
WHERE tipus_preg = 'ng' AND idtest =0 AND idpregu NOT
IN (
SELECT idpregu
FROM preguntes
WHERE idtest =2 )
Y el error que me aparece es el siguiente:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT idpregu
FROM preguntes
WHERE idtest =2 )
Haber si me podeis echar una mano porque ya no se como solucionarlo.
Muchas gracias
SELECT pregunta, idtest
FROM preguntes
WHERE tipus_preg = 'ng' AND idtest =0 AND idpregu NOT
IN (
SELECT idpregu
FROM preguntes
WHERE idtest =2 )
Y el error que me aparece es el siguiente:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT idpregu
FROM preguntes
WHERE idtest =2 )
Haber si me podeis echar una mano porque ya no se como solucionarlo.
Muchas gracias