TIA all

I have a table containing milestones achieved for projects, marked as
being in particular quarters.

CREATE TABLE milestones (
    proj_id     int4,
    sortorder   SERIAL,
    qtr         int4,
    description varchar(200)
);

Now I need the milestone descriptions output across the page like:
  proj_id | q1 | q2 | q3 | q4
and sorted according to "sortorder".

Judicious use of CASE can get me the quarterly columns but I need to
eliminate holes. Any clever ideas without resorting to procedural
solutions (either table function or application code)?

TIA

- Richard Huxton

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to