Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 5437EB5DBC8 for ; Sun, 19 Jun 2011 00:34:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 32025-03 for ; Sun, 19 Jun 2011 03:34:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) by mail.postgresql.org (Postfix) with ESMTP id A2B38B5D801 for ; Sun, 19 Jun 2011 00:34:03 -0300 (ADT) Received: by pzk9 with SMTP id 9so2697216pzk.19 for ; Sat, 18 Jun 2011 20:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=3j5aaJWpKiBUO6VxJ+66uNwvxv4u0cGziIJ7nH9EJzI=; b=J3cWpjSCsFlZ57b7vhUJeN8IwGhqwTj+4MdPjYTDSJUdi2XbO8vhScdo1bw2aqc4Sj uI+PMZWcpBO8fM+nMT5eFIZXmEgTPnUWeolabuT2Fj1UPEjWT90Nk/DyVsu0kA20/hU5 IFOSZQsxxnTN+rx++KIlENUPAhGNnCyPTZzpc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=A7N+Cd8jx7uSIWEwMkP5PuLV/B6IpTDysinnEBGEsNw1+J2uCjZaMn0zbX35xFDXXy ywB4xxk5dUiVWf7TsgEwX6GH8/MlweBmNXQjroJ24tc7zBGV6oOrqp3/33hYWapqjoUK jwcmmLX0bOuMvSAkCAaNkqRAWy1uoTvoSaBC0= Received: by 10.68.0.227 with SMTP id 3mr1652288pbh.284.1308454442847; Sat, 18 Jun 2011 20:34:02 -0700 (PDT) Received: from [192.168.0.6] (rsargent.dsl.xmission.com [199.104.125.126]) by mx.google.com with ESMTPS id 10sm2385530pbk.77.2011.06.18.20.34.00 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 18 Jun 2011 20:34:01 -0700 (PDT) Message-ID: <4DFD6E22.1090700@gmail.com> Date: Sat, 18 Jun 2011 21:33:54 -0600 From: Rob Sargent User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: Tripura CC: pgsql-sql@postgresql.org Subject: Re: Append n Rows into a Single Row References: <1308356423557-4500306.post@n5.nabble.com> In-Reply-To: <1308356423557-4500306.post@n5.nabble.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.776 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201106/66 X-Sequence-Number: 35532 Look at the array aggregation functions here Tripura wrote: > Hi, > I am totally new to PostgreSQL and this is my first script. > Can anyone please help me with my following requirement > > I have script that returns 1 column and 40 rows. > My requirement is update this existing script to show all the 40 rows data > in a single row as a string. > > For example > The current script returns, something like this > Tom > Tad > Max > Ted > > I have to update the existing script to show the above results as follow > Tom || Tad || Max || Ted > > Something like colace in Ms sql > > Any help is really appriciated. > > Thankyou in Advance. > > > > > > > > -- > View this message in context: http://postgresql.1045698.n5.nabble.com/Append-n-Rows-into-a-Single-Row-tp4500306p4500306.html > Sent from the PostgreSQL - sql mailing list archive at Nabble.com. > >