dynamic columns in a query - Mailing list pgsql-sql

From Jyoti Seth
Subject dynamic columns in a query
Date
Msg-id 000001c9ea68$217cb890$647629b0$@com
Whole thread Raw
In response to setting the where clause  (johnf <jfabiani@yolo.com>)
Responses Re: dynamic columns in a query
Re: dynamic columns in a query
List pgsql-sql
Hi All,

Is there any way in postgres to write a query to display the result in
matrix form. (where column names are dynamic)

For eg.


Employee Name    Client1    Client2    Client3    Client4
Emp1            100        102        90        23
Emp2            56        0        23        98
Emp3            34        45        76        0


Here Client1, Client2... are the values from the database.

Thanks,
Jyoti




pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: Avoiding "will create implicit index" NOTICE
Next
From: "A. Kretschmer"
Date:
Subject: Re: dynamic columns in a query