Ver Mensaje Individual
  #3  
Antiguo 01-02-2006
Avatar de RONPABLO
[RONPABLO] RONPABLO is offline
Miembro Premium
 
Registrado: oct 2004
Posts: 1.514
Reputación: 21
RONPABLO Va por buen camino
se puede directamente en un query con un case, algo asi como lo siguiente:

Código SQL [-]
Select
 case a.id 
    when 1 then 'pedro'
    when 2 then 'pablo'
     when 3 then (select first 1 d.nombre from tablaNombres d where d.id = 3)
else 'No se quien mas'
 end as nombre
from miTabla a
Responder Con Cita