X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0538852A65 for ; Wed, 4 May 2005 01:56:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82132-06 for ; Wed, 4 May 2005 04:56:18 +0000 (GMT) Received: from mx2.net2cyber.net (unknown [202.43.166.61]) by svr1.postgresql.org (Postfix) with ESMTP id 939B653711 for ; Wed, 4 May 2005 01:56:14 -0300 (ADT) Received: from goliath.3wsi.net (unknown [202.43.166.77]) by mx2.net2cyber.net (Postfix) with SMTP id 7EE7759E0E for ; Wed, 4 May 2005 12:03:48 +0700 (WIT) Received: (qmail 3249 invoked by uid 1026); 4 May 2005 04:55:50 -0000 Received: from richard@orbisindonesia.com by goliath.3wsi.net by uid 64011 with qmail-scanner-1.22 (sophie: 3.04/2.28/3.90. spamassassin: 2.60. Clear:RC:1(202.81.37.24):. Processed in 0.512976 secs); 04 May 2005 04:55:50 -0000 Received: from unknown (HELO vas.3wsi.net) (202.81.37.24) by 0 with SMTP; 4 May 2005 04:55:49 -0000 Received: (qmail 9294 invoked from network); 4 May 2005 04:55:54 -0000 Received: from unknown (HELO webmail.orbisindonesia.com) (202.81.37.24) by 0 with SMTP; 4 May 2005 04:55:54 -0000 Received: from 202.81.37.29 (SquirrelMail authenticated user richard@orbisindonesia.com); by webmail.orbisindonesia.com with HTTP; Wed, 4 May 2005 11:55:54 +0700 (WIT) Message-ID: <33787.202.81.37.29.1115182554.squirrel@202.81.37.29> In-Reply-To: <200505040631.48380.j.lochmann@i-penta.at> References: <33995.202.81.37.29.1115107252.squirrel@202.81.37.29> <6.1.2.0.2.20050503080723.03272f48@mail.hightowergroup.com> <33263.202.81.37.29.1115172586.squirrel@202.81.37.29> <200505040631.48380.j.lochmann@i-penta.at> Date: Wed, 4 May 2005 11:55:54 +0700 (WIT) Subject: Re: How the query please! From: "Richard Sitompul" To: "Johannes Lochmann" Cc: pgsql-admin@postgresql.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.349 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, URIBL_SBL X-Spam-Level: X-Archive-Number: 200505/36 X-Sequence-Number: 17465 Hi folks, Thanks for all, I found it. I use this query. (((( SELECT tbl_product1.part_number, tbl_product1.product_name FROM tbl_product1 UNION ALL SELECT tbl_product2.part_number, tbl_product2.product_name FROM tbl_product2) UNION ALL SELECT tbl_product3.part_number, tbl_product3.product_name FROM tbl_product3) UNION ALL SELECT tbl_product4.part_number, tbl_product4.product_name FROM tbl_product4) UNION ALL SELECT tbl_product5.part_number, tbl_product5.product_name FROM tbl_product5) UNION ALL SELECT tbl_product6.part_number, tbl_product6.product_name FROM tbl_product6; > On Wednesday 04 May 2005 04:09, Richard Sitompul wrote: > > Hello Richard! > >> I have six table_product, for example : >> table_product_1 >> table_product_2 >> table_product_3 >> table_product_4 >> table_product_5 >> table_product_6 >> >> in table_product_1 until table_product_6 have field part_number and >> product_name. I want to ask here, how the query to get the part_number >> and >> product_name in one view(product_view). > > hm. are you searching for something like this, perhaps? > > create view product_view > as > select > part_number > ,product_name > from table_product_1 > > union > > select > part_number > ,product_name > from table_product_2 > > union > > ... > >> Any body can help me again? > > Is it this what you where searching for? > > HAND && HTH > > Johannes > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- >>Richard Sitompul<< Software Engineer PT. Orbis Indonesia http://www.orbisindonesia.com http://richardsstp.3wsi.net