Thread: How the query please!
Hi folks Any body can help me? I have six table_product, in @ table_product have field part_number and product_name, I want to get the part_number and the product_name from the six table_product. How the query to get the field part_number and the product_name? Best Regards, Richard Sitompul
Richard, I am not sure if I really understand your question, but..... I think what you want is: "select part_number, product_name from table_product" Again I am not sure if I understand what you are really looking for so if this is not it ask again. Enthusiastically, Dave Leedom At 04:00 AM 5/3/2005, Richard Sitompul wrote: >Hi folks >Any body can help me? >I have six table_product, in @ table_product have field part_number and >product_name, I want to get the part_number and the product_name from the >six table_product. How the query to get the field part_number and the >product_name? > > >Best Regards, > >Richard Sitompul > > > > > >---------------------------(end of broadcast)--------------------------- >TIP 4: Don't 'kill -9' the postmaster The Hightower Group, Inc. Custom Software Solutions Designed To Fit Your Business Like A Glove. 165 West Airport Road, Suite B/Lititz, PA 17543 V:717-560-4002, 877-560-4002 x: 114 F:717-560-2825 www.hightowergroup.com
Sorry if you not understand what i mean :D 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). Any body can help me again? Best Regards, Richard Sitompul > Richard, > > I am not sure if I really understand your question, but..... > > I think what you want is: > > "select part_number, product_name from table_product" > > Again I am not sure if I understand what you are really looking for so if > this is not it ask again. > > Enthusiastically, > > Dave Leedom > > At 04:00 AM 5/3/2005, Richard Sitompul wrote: >>Hi folks >>Any body can help me? >>I have six table_product, in @ table_product have field part_number and >>product_name, I want to get the part_number and the product_name from >> the >>six table_product. How the query to get the field part_number and the >>product_name? >> >> >>Best Regards, >> >>Richard Sitompul >> >> >> >> >> >>---------------------------(end of broadcast)--------------------------- >>TIP 4: Don't 'kill -9' the postmaster > > > > The Hightower Group, Inc. > Custom Software Solutions Designed To Fit Your Business Like A Glove. > 165 West Airport Road, Suite B/Lititz, PA 17543 > V:717-560-4002, 877-560-4002 x: 114 > F:717-560-2825 > www.hightowergroup.com > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq >
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
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