Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UBOiT-0001OD-AP for pgsql-it-generale@arkaria.postgresql.org; Fri, 01 Mar 2013 12:05:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UBOiS-0001sA-ON for pgsql-it-generale@arkaria.postgresql.org; Fri, 01 Mar 2013 12:05:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UBOiS-0001rM-BR for pgsql-it-generale@postgresql.org; Fri, 01 Mar 2013 12:05:32 +0000 Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UBOiP-0005nt-Jp for pgsql-it-generale@postgresql.org; Fri, 01 Mar 2013 12:05:31 +0000 Received: from know-smtpout-1.server.virginmedia.net ([62.254.123.3]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20130301120527.QDEB1579.mtaout03-winn.ispmail.ntl.com@know-smtpout-1.server.virginmedia.net> for ; Fri, 1 Mar 2013 12:05:27 +0000 Received: from [77.99.161.245] (helo=756b4.gi.lan) by know-smtpout-1.server.virginmedia.net with esmtp (Exim 4.63) (envelope-from ) id 1UBOhO-0000U3-Ix for pgsql-it-generale@postgresql.org; Fri, 01 Mar 2013 12:04:26 +0000 Received: from gianni by 756b4.gi.lan with local (masqmail 0.2.30) id 1UBOhO-1sW-00 for ; Fri, 01 Mar 2013 13:04:26 +0100 Date: Fri, 1 Mar 2013 13:04:26 +0100 From: Gianni Ciolli To: pgsql-it-generale@postgresql.org Subject: Re: query concatenate Message-ID: <20130301120426.GD3079@756b4.gi.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Cloudmark-Analysis: v=1.1 cv=GaEGOwq9FwezmTggA+b6yC6zDZF2HYaK6RN/tSqdnVA= c=1 sm=0 a=wom5GMh1gUkA:10 a=9PA7aSw7vYUA:10 a=b30I1FEBwLAA:10 a=8nJEP1OIZ-IA:10 a=Rdvl4hr_AAAA:8 a=siN5Jjdh85ZihbPcPLAA:9 a=wPNLvfGTeEIA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-it-generale Precedence: bulk Sender: pgsql-it-generale-owner@postgresql.org Ciao Eugenio, On Fri, Mar 01, 2013 at 11:53:17AM +0000, Eugenio Trumpy wrote: > ho provato con join ma mi si replicano troppe volte le row.Qualcuno ha suggerimenti? potresti provare con SELECT * FROM t1 LEFT JOIN t2 ON t1.key = t2.key LEFT JOIN t3 ON t1.key = t3.key ORDER BY t1.key; che a me dà il seguente output: key | f1 | f2 | f3 | key | f4 | f5 | key | f6 | f7 -----+----+----+----+-----+-----+-----+-----+----+---- 1 | a | b | c | | | | 1 | t | v 2 | d | e | f | 2 | oo | pp | 2 | v | z 2 | d | e | f | 2 | ooo | ppp | 2 | v | z 2 | d | e | f | 2 | o | p | 2 | v | z 3 | g | h | i | 3 | r | s | 3 | j | k 4 | l | m | n | | | | | | (6 righe) Saluti, Dr. Gianni Ciolli - 2ndQuadrant Italia PostgreSQL Training, Services and Support gianni.ciolli@2ndquadrant.it | www.2ndquadrant.it -- Sent via pgsql-it-generale mailing list (pgsql-it-generale@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-it-generale