I'm using mysql 4.0.21 and Toad to run this query. The message i'm receiving is that there is a Syntax error, where?
select a.id_opcion, a.nombre, a.campo, a.visible, b.id_usuario,
if(b.ancho is null, 50, b.ancho) as ancho, b.posicion
from det_rmen as a
left join
(select *
from rmen_usu
where id_usuario = 'generico') as b
on (a.id_opcion = b.id_opcion and a.campo = b.campo)
where (b.id_usuario='generico') or (b.id_usuario is NULL)
order by id_opcion, posicion;
can anyone helpme, i have spend 2 hours looking for a solution......
select a.id_opcion, a.nombre, a.campo, a.visible, b.id_usuario,
if(b.ancho is null, 50, b.ancho) as ancho, b.posicion
from det_rmen as a
left join
(select *
from rmen_usu
where id_usuario = 'generico') as b
on (a.id_opcion = b.id_opcion and a.campo = b.campo)
where (b.id_usuario='generico') or (b.id_usuario is NULL)
order by id_opcion, posicion;
can anyone helpme, i have spend 2 hours looking for a solution......