Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 0C0FA2E3335 for ; Wed, 5 Dec 2007 06:24:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 77606-10 for ; Wed, 5 Dec 2007 06:24:14 -0400 (AST) Received: from n10.bullet.re3.yahoo.com (n10.bullet.re3.yahoo.com [68.142.237.123]) by postgresql.org (Postfix) with SMTP id ADA002E355C for ; Wed, 5 Dec 2007 06:24:17 -0400 (AST) Received: from [68.142.230.28] by n10.bullet.re3.yahoo.com with NNFMP; 05 Dec 2007 10:24:16 -0000 Received: from [66.196.101.133] by t1.bullet.re2.yahoo.com with NNFMP; 05 Dec 2007 10:24:16 -0000 Received: from [127.0.0.1] by rrr4.mail.re1.yahoo.com with NNFMP; 05 Dec 2007 10:24:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 44808.2951.bm@rrr4.mail.re1.yahoo.com Received: (qmail 85679 invoked by uid 60001); 5 Dec 2007 10:24:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=dGmFCy3qBYwv6bgBh78ZAh1msID3xACaIj0uGeFxA1/eNA07sgBJWMAJXOeiqL097qU3ZSbQJPIihBqxj2AFHhGdGw4AON/FAvL1d9Uk+nlAZrSQaoOiq1HXbqHU89e40uljIV3xO/f2mirXbQXDqvVAJIV8TpeqeYP1p1CAwbc=; X-YMail-OSG: Oiqi1GAVM1lkFLf4yZsBnsDpHytTpXElGjRI2sLR1toeTKkBh5v_0T3zGS2EmeUpwSjLjvpW0_1gORg601H.meaks_kd6WoU9mSH Received: from [59.163.11.66] by web94301.mail.in2.yahoo.com via HTTP; Wed, 05 Dec 2007 10:24:04 GMT Date: Wed, 5 Dec 2007 10:24:04 +0000 (GMT) From: Ashish Karalkar Subject: SQL Query To: pgsql-general@postgresql.org, ashish.karalkar@netcore.co.in MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1769925773-1196850244=:85383" Content-Transfer-Encoding: 8bit Message-ID: <843803.85383.qm@web94301.mail.in2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/240 X-Sequence-Number: 124984 --0-1769925773-1196850244=:85383 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello List member, Iha a table containing two columns x and y . for single value of x there are multiple values in y e.g X Y ------------ 1 ABC 2 PQR 3 XYZ 4 LMN 1 LMN 2 XYZ I want a query that will give me following output 1 ABC:LMN 2 PQR:XYZ 3 XYZ 4 LMN Any help will be really helpful Thanks in advance With Regards Ashish --------------------------------- Why delete messages? Unlimited storage is just a click away. --0-1769925773-1196850244=:85383 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello List member,

Iha a table containing two columns x and y . for single value of x there are multiple values in y e.g

X      Y
------------
1       ABC
2       PQR
3       XYZ
4       LMN
1       LMN
2       XYZ

I want a query that will give me following output

1   ABC:LMN
2   PQR:XYZ
3   XYZ
4   LMN

Any help will be really helpful

Thanks in advance

With Regards
Ashish








Why delete messages? Unlimited storage is just a click away. --0-1769925773-1196850244=:85383--