If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > Transporse in psql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Dec 2012
Posts: 1
Transporse in psql

0 down vote favorite


I have a Postgresql function in which gives me the following o/p :
Code:
              Sl.no    username     Designation     salary   etc..
                 1           A               XYZ            10000    ....
                 2           B               RTS            50000    .....
                 3           C              QWE            20000    ....
                 4           D              HGD            34343    ...
Now I want the Output as below :
Code:
         Sl.no                       1       2        3     4       .....
        Username               A       B        C     D      ...
        Designation            XYZ     RTS      QWE    HGD     ....
       Salary                 10000   50000    20000   34343   .......

plz help..how to transporse this ..

Last edited by loquin; 01-30-13 at 18:03. Reason: add CODE tags so as to keep tab/spacing
Reply With Quote
Reply

Tags
psql, transposing record sets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On