Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/02/2008, 04:35
pendejo1983
 
Fecha de Ingreso: noviembre-2007
Mensajes: 163
Antigüedad: 16 años, 5 meses
Puntos: 0
problema con IN

Hola, tengo un problemilla con una select en mysql

si hago:

select iddivision from pais_division where pais = 'FINLANDIA';

obtengo un conjunto de resultados

si hago:

select * from equipo where iddivision in (select iddivision from pais_division where pais = 'FINLANDIA');

peta, el error es "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 iddivision from pais_division where pais = 'FINLANDIA')'"

Pero si la consula la hago así:

select * from equipo where idequipo in ('215', '216', '259');

que son los 3 valores de la select inicial funciona

alguna idea? yo juraría que haciendo esto mismo en oracle no tengo ningún problema, pero aqui no veo el error