QUERY PARA QUE ME MUESTRE LOS DATOS DE LA CONSULTA DE HORIZONTAL A VERTICAL

2017-09-07 Thread Maria Antonieta Ramirez
Buena tarde, Disculpen hay alguna forma en la que pueda mostrarme postgres el resultado de mi consulta de forma vertical? como ejemplo tengo la siguiente consulta: select clave, nombre, apellido_paterno from alumnos where id= 1; Les agradezco mucho por su tiempo tomado. Gracias.

Re: QUERY PARA QUE ME MUESTRE LOS DATOS DE LA CONSULTA DE HORIZONTAL A VERTICAL

2017-09-07 Thread Maria Antonieta Ramirez
Gracias por contestar. Busque el equivalente y es string_agg en postgres. y mi consulta queda asi: SELECT descripcion, string_agg( claveservicio, ',')AS "COLUMNA 1" FROM educaciondistancia.bancos_maestria where descripcion = 'HSBC' group by descripcion; y me dio el siguiente resultad

Re: QUERY PARA QUE ME MUESTRE LOS DATOS DE LA CONSULTA DE HORIZONTAL A VERTICAL

2017-09-07 Thread Hellmuth Vargas
Hola lista Verifique la función crosstab de la extensión tablefunc https://www.postgresql.org/docs/current/static/tablefunc.html El 7 sept. 2017 5:30 PM, "Maria Antonieta Ramirez" < marami...@ulsaneza.edu.mx> escribió: > > Gracias por contestar. > > > Busque el equivalente y es string_agg en po