Tuesday, 17 September 2013

postgresql transpose rows an columns misery

postgresql transpose rows an columns misery

I have gone through all of the similar topics and can't seem to solve my
problem. I have a table like this:
id[PK] key[PK] value
22 ingfs east1 22 storage stgeast1 23 ingfs east2 23 storage stgeast2 24
ingfs west3 24 storage stgwest3
I want to get:
ingfs storage
east1 stgeast1 east2 stgeast2 east3 stgeast3
I have tried the pivot table example but don't seem to be able to get
anything to work. Seems like this should be simple but I can't get my head
wrapped around it. Thanks in advance for any assistance.
rjl

No comments:

Post a Comment