Unix Technical Forum

Transposing a table

This is a discussion on Transposing a table within the pgsql Novice forums, part of the PostgreSQL category; --> HI all...This is very urgent ......How cab I transpose a table in postgresql...does it have any buit in SQl ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 09:32 PM
ravi shankar
 
Posts: n/a
Default Transposing a table

HI all...This is very urgent ......How cab I transpose a table in
postgresql...does it have any buit in SQl feature or functions ...Plz
help in this regard....
Regards
Ravi Shankar

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 09:32 PM
Sean Davis
 
Posts: n/a
Default Re: Transposing a table

This seems like a relatively straightforward thing to do in pl/perl,
though I don't have time to write code right now. Also, I think this
could be done easily with pl/R, as R has a transpose command. Of
course, if you want to store it back into the database, there will be
some table creation issues.

However, how big is your table? How many times are you going to do
this operation? Could this be done on the client side or even use
Excel or something like that to do the transpose?

Sean

On Feb 24, 2005, at 12:54 AM, ravi shankar wrote:

> HI all...This is very urgent ......How cab I transpose a table in
> postgresql...does it have any buit in SQl feature or functions ...Plz
> help in this regard....
> Regards
> Ravi Shankar
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 09:32 PM
Frank Bax
 
Posts: n/a
Default Re: Transposing a table

At 12:54 AM 2/24/05, ravi shankar wrote:
>HI all...This is very urgent ......How cab I transpose a table in
>postgresql...does it have any buit in SQl feature or functions ...Plz
>help in this regard....



Search archives and/or google for "pivot table" and/or "crosstab".


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 09:32 PM
Bruno Wolff III
 
Posts: n/a
Default Re: Transposing a table

On Thu, Feb 24, 2005 at 11:24:34 +0530,
ravi shankar <ravi2082@gmail.com> wrote:
> HI all...This is very urgent ......How cab I transpose a table in
> postgresql...does it have any buit in SQl feature or functions ...Plz
> help in this regard....
> Regards
> Ravi Shankar


You aren't very clear about what you are looking for, but the crosstab
functions in the tablefunc contrib module might be what you are looking for.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com