Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Outer joins?



Emils <gnudiff(at)gmail(dot)com> writes:
> The table structure is:

> object_values
> ==========
> obj_id
> att_id
> value

> namely, each object can have arbitrary number of attributes each of
> them with a value.

> What I want, is a simple table of objects with some of their specific
> attributes, the result should be in form:

> obj_id1   o1att1_value  o1att2_value o1att3_value
> obj_id2   o2att1_value  o2att2_value o2att3_value
> ...

This isn't an outer-join problem, it's a crosstab problem.  Try the
crosstab functions in contrib/tablefunc.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group