Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/06/2010, 16:45
ralphfm9
 
Fecha de Ingreso: junio-2010
Ubicación: Monterrey, México
Mensajes: 13
Antigüedad: 13 años, 9 meses
Puntos: 0
juntar varios selects

quiero juntar varios selects para que muestren un solo resultado de forma horizontal osea a la derecha, estos son los selects:

select U.strUsuNombre,P.strPrmDescripcion as Nivel1 from dbo.catUsuarios U, dbo.relUsuariosPermisos UP, dbo.catPermisos P
where U.shtUsuLlave = UP.shtUsuLlave
and UP.intPrmLlave = P.intPrmLlave
and P.intPrmPadre = 0
--and U.strUsuNombre = 'asanchez'
order by U.strUsuNombre



select P.strPrmDescripcion Nivel2 from dbo.catUsuarios U, dbo.relUsuariosPermisos UP, dbo.catPermisos P
where U.shtUsuLlave = UP.shtUsuLlave
and UP.intPrmLlave = P.intPrmLlave
and P.intPrmPadre like '%_0000%'
--and U.strUsuNombre = 'asanchez'
order by U.strUsuNombre

select P.strPrmDescripcion from dbo.catUsuarios U, dbo.relUsuariosPermisos UP, dbo.catPermisos P
where U.shtUsuLlave = UP.shtUsuLlave
and UP.intPrmLlave = P.intPrmLlave
and P.intPrmPadre like '%000'
and P.intPrmPadre not like '%_0000%'
--and U.strUsuNombre = 'asanchez'
order by U.strUsuNombre

select P.strPrmDescripcion from dbo.catUsuarios U, dbo.relUsuariosPermisos UP, dbo.catPermisos P
where U.shtUsuLlave = UP.shtUsuLlave
and UP.intPrmLlave = P.intPrmLlave
--and P.intPrmPadre = P.intPrmLlave
and P.intPrmPadre not like '%000'
and P.intPrmPadre not like '%_0000%'
and P.intPrmPadre != 0
--and U.strUsuNombre = 'asanchez'
order by U.strUsuNombre

alguna idea?

saludos y gracias.