X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D6B8E9DCAA6 for ; Sat, 4 Mar 2006 01:00:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29341-09 for ; Sat, 4 Mar 2006 01:00:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id ADFF99DC9A9 for ; Sat, 4 Mar 2006 01:00:48 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k2450ixf081458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 3 Mar 2006 22:00:46 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id k2450hQa055681; Fri, 3 Mar 2006 22:00:43 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id k2450hUq055680; Fri, 3 Mar 2006 22:00:43 -0700 (MST) (envelope-from mfuhr) Date: Fri, 3 Mar 2006 22:00:43 -0700 From: Michael Fuhr To: sathish kumar shanmugavelu Cc: pgsql-jdbc@postgresql.org Subject: Re: Aggregate function for a text column Message-ID: <20060304050043.GA55618@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.122 required=5 tests=[AWL=0.122] X-Spam-Score: 0.122 X-Spam-Level: X-Archive-Number: 200603/17 X-Sequence-Number: 14798 On Sat, Mar 04, 2006 at 10:15:46AM +0530, sathish kumar shanmugavelu wrote: > Now i want a result like below > 'Praveen Systems, Zigma Systems, HCL Tech, Vela Book Shop, Senthil > Books, Usha, > Electricals, National Scientific Company, Indian Oil Corporation' Will something like this work? SELECT array_to_string(ARRAY(SELECT supplier_name FROM tablename), ', '); -- Michael Fuhr