X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id EBC3E9DCA76 for ; Sat, 11 Mar 2006 12:31:41 -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 95611-01 for ; Sat, 11 Mar 2006 12:31:39 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id B475C9DCA22 for ; Sat, 11 Mar 2006 12:31:38 -0400 (AST) Received: from hosts.rhea.solnet (0x50c60afe.vgnxx3.adsl-dhcp.tele.dk [80.198.10.254]) by svr4.postgresql.org (Postfix) with ESMTP id 17D0F5AF84B for ; Sat, 11 Mar 2006 16:31:37 +0000 (GMT) Received: from io.solnet (io.solnet [10.1.1.8]) (authenticated bits=0) by hosts.rhea.solnet (8.13.0/8.13.0) with ESMTP id k2BH3QtF016760 for ; Sat, 11 Mar 2006 18:03:26 +0100 Date: Sat, 11 Mar 2006 17:31:33 +0100 From: "Jesper K. Pedersen" To: pgsql-sql@postgresql.org Subject: Merging rows into one result? Message-ID: <20060311173133.1358a018@io.solnet> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.6.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamd / ClamAV version 0.74, clamav-milter version 0.74a on rhea X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/163 X-Sequence-Number: 24509 Is it possible to use SQL to merge data into one result? A theorethical example to explain: tbl_test ( id integer, information varchar(25)) id | information ---+-------------- 1 | Yo 2 | Go away 1 | Stay put 3 | Greetings Please note id is not unique and not a primary key. and I wonder if there is any functions to "merge" data (sort of concat'ing). A normal: select information from tbl_test where id=1 would result in the rows Yo Stay put I would like a single row result in the format of: Yo Stay put Any ideas on this? Best regards Jesper K. Pedersen