On Wed, Sep 5, 2012 at 10:14 PM, punnoose <punnoose...@dwisesolutions.com>wrote:
> I want to have a pivot like function in which i should have variable number > of columns.i went for crosstab but it doesnot support variable number of > columns.Can any body suggest an alternative.like if i have a event at a > particular time of the day like one at 02:35,11:34, then i should have > column name 02:35,11:34. > > You could detect the columns you want to return and use a plpgsql function that returns a refcursor, I suppose. Best Wishes, Chris travers