Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 389131337BF7 for ; Thu, 5 May 2011 17:19:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 54737-04-6 for ; Thu, 5 May 2011 20:19:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm22-vm0.bullet.mail.bf1.yahoo.com (nm22-vm0.bullet.mail.bf1.yahoo.com [98.139.212.126]) by mail.postgresql.org (Postfix) with SMTP id C33271337BFD for ; Thu, 5 May 2011 17:18:53 -0300 (ADT) Received: from [98.139.212.151] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 05 May 2011 20:18:53 -0000 Received: from [98.139.212.195] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 05 May 2011 20:18:53 -0000 Received: from [127.0.0.1] by omp1004.mail.bf1.yahoo.com with NNFMP; 05 May 2011 20:18:53 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 225809.30652.bm@omp1004.mail.bf1.yahoo.com Received: (qmail 73512 invoked by uid 60001); 5 May 2011 20:18:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1304626733; bh=HB0OfzLl6fQljlxWr8Z4h8fJHScMsVNe2wyYJHDLKk4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=hsMKqh1T5UKlnC7VZsYEKhmC+EuQ3JNy2U6VNue/GcLImXP10J9WUqLCAAcl75iSFtDFCQWAkybNNTJwle+0hPVs7XOK1pVED1qLm3nqlOW9qEt0TxAXHRJn36ki4HnQshXGwg7DPWP5G1N7PdsmVjX6p42+vfAR22FzGsNPFKY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=O80yWUyRusn+rAU4uDFudzdIFB10eAVQ87G8L8iY6KVoJ6F7lx/19ADjMjTiiyZWPv820mQyT79O7ptRGxMvr5rNHphj8Ps3PtmiIHvIHpO4/rkkhBGPEMOfxGyKmpdyrzlT+J1Rhdmxs7qwGncpLo47uqIN+TV2yZWAAcw4nw8=; Message-ID: <139192.67117.qm@web161316.mail.bf1.yahoo.com> X-YMail-OSG: AW21WqcVM1lFk_4GFBQ7s0zUT15JHMu.nLccLj_yGiWICLV q_mAvm9.SXFDq.sHXp0hrqq3jCKa22.KpROrb_bW0Q8YsosmIiYofeAR.EUz wJOnX_Ac188OhOQ3seGPI9rT5Yf5GToFSsfPLKUDw21sB5gXxy0cMeje160n GhFDioD_XG9J9M87k9WnwazSNgX6AUz7KlCAlFtqGWBFU82bxKHbovFR70ED EQ0JPYUb8kmnoIr5PnUcLim0ZwIwo_tEgJ.7JIAQa65fFxSPzbYu3KPG2jVu FaBE1_zdBXn7BiylpqGSWACJQscFGsM4FSC7hZqhLw_gKE96XCx9PoPoEoT6 Y5PzjBrXW8ZjZkmwP9AdbglnfbA-- Received: from [135.11.3.4] by web161316.mail.bf1.yahoo.com via HTTP; Thu, 05 May 2011 13:18:53 PDT X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.110.299900 Date: Thu, 5 May 2011 13:18:53 -0700 (PDT) From: Claudio Adriano Guarracino Subject: Select and merge rows? To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-816598683-1304626733=:67117" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.803 tagged_above=-5 required=5 tests=BAYES_50=0.8, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201105/23 X-Sequence-Number: 35307 --0-816598683-1304626733=:67117 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello! I have a doubt about a query that I tried to do, but I cant...... This is the scenario: I have a table, with this rows: order=A0=A0=A0 ID=A0=A0=A0 value=A0=A0=A0=20 ---------------------- 1=A0=A0=A0 1000=A0=A0=A0 3 2=A0=A0=A0 1000=A0=A0=A0 5 3=A0=A0=A0 1000=A0=A0=A0 6 1=A0=A0=A0 1001=A0=A0=A0 1 2=A0=A0=A0 1001=A0=A0=A0 2 1=A0=A0=A0 1002=A0=A0=A0 4 2=A0=A0=A0 1002=A0=A0=A0 4 I need to get this table, divided by ID, like this: id=A0=A0=A0 value1=A0=A0=A0 value2=A0=A0=A0 value3 -------------------------------- 1000=A0=A0=A0 3=A0=A0=A0 5=A0=A0=A0 6 1001=A0=A0=A0 1=A0=A0=A0 2 1002=A0=A0=A0 1=A0=A0=A0 2 How I can do this? I tried with cursors and view, but i can't.... Any help is welcome! Thanks in advance! Regards, --0-816598683-1304626733=:67117 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hello!
I have a doubt about a query that I= tried to do, but I cant......
This is the scenario:
I have a table, = with this rows:
order    ID    value =   
----------------------
1    1000 &n= bsp;  3
2    1000    5
3 &nbs= p;  1000    6
1    1001  &n= bsp; 1
2    1001    2
1  &nbs= p; 1002    4
2    1002    4=

I need to get this table, divided by ID, like this:
id &nbs= p;  value1    value2    value3
------= --------------------------
1000    3    5&= nbsp;   6
1001    1    2
1002    1    2

How I can do this= ?
I tried with cursors and view, but i can't....
Any help is welcome!=

Thanks in advance!
Regards,

--0-816598683-1304626733=:67117--