Re: [SQL] Select and merge rows?

2011-05-05 Thread Claudio Adriano Guarracino
/current/interactive/tablefunc.html In this case, i use: F.36.1.4. - crosstab(text, text). Thanks to Osvaldo Kussama for this help! --- On Thu, 5/5/11, Claudio Adriano Guarracino wrote: From: Claudio Adriano Guarracino Subject: Re: [SQL] Select and merge rows? To: pgsql-sql@postgresql.org, &qu

Re: [SQL] Select and merge rows?

2011-05-05 Thread Claudio Adriano Guarracino
Thank you very much! Your example help me a lot! The original query is more complex, but I can continue with this example. Thanks again! --- On Thu, 5/5/11, scorpda...@hotmail.com wrote: From: scorpda...@hotmail.com Subject: Re: [SQL] Select and merge rows? To: "Claudio Adriano Guarr

[SQL] Select and merge rows?

2011-05-05 Thread Claudio Adriano Guarracino
1000    3   5           6 1001    1   2 1002   4   4 Thanks! Regards, --- On Thu, 5/5/11, Claudio Adriano Guarracino wrote: From: Claudio Adriano Guarracino Subject: Select and merge rows? To: pgsql-sql@postgresql.org Date: Thursday, May 5

[SQL] Select and merge rows?

2011-05-05 Thread Claudio Adriano Guarracino
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    3 2    1000    5 3    1000    6 1    1001    1 2    1001    2 1    1002    4 2    1002    4 I need to get this