pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow the query please!
5+ messages / 3 participants
[nested] [flat]
* How the query please!
@ 2005-05-03 08:00 Richard Sitompul <richard@orbisindonesia.com>
2005-05-03 12:07 ` Re: How the query please! David A. Leedom <daleedom@hightowergroup.com>
0 siblings, 1 reply; 5+ messages in thread
From: Richard Sitompul @ 2005-05-03 08:00 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How the query please!
2005-05-03 08:00 How the query please! Richard Sitompul <richard@orbisindonesia.com>
@ 2005-05-03 12:07 ` David A. Leedom <daleedom@hightowergroup.com>
2005-05-04 02:09 ` Re: How the query please! Richard Sitompul <richard@orbisindonesia.com>
0 siblings, 1 reply; 5+ messages in thread
From: David A. Leedom @ 2005-05-03 12:07 UTC (permalink / raw)
To: Richard Sitompul <richard@orbisindonesia.com>; pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How the query please!
2005-05-03 08:00 How the query please! Richard Sitompul <richard@orbisindonesia.com>
2005-05-03 12:07 ` Re: How the query please! David A. Leedom <daleedom@hightowergroup.com>
@ 2005-05-04 02:09 ` Richard Sitompul <richard@orbisindonesia.com>
2005-05-04 04:31 ` Re: How the query please! Johannes Lochmann <j.lochmann@i-penta.at>
0 siblings, 1 reply; 5+ messages in thread
From: Richard Sitompul @ 2005-05-04 02:09 UTC (permalink / raw)
To: David A. Leedom <daleedom@hightowergroup.com>; +Cc: pgsql-admin
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
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How the query please!
2005-05-03 08:00 How the query please! Richard Sitompul <richard@orbisindonesia.com>
2005-05-03 12:07 ` Re: How the query please! David A. Leedom <daleedom@hightowergroup.com>
2005-05-04 02:09 ` Re: How the query please! Richard Sitompul <richard@orbisindonesia.com>
@ 2005-05-04 04:31 ` Johannes Lochmann <j.lochmann@i-penta.at>
2005-05-04 04:55 ` Re: How the query please! Richard Sitompul <richard@orbisindonesia.com>
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Lochmann @ 2005-05-04 04:31 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How the query please!
2005-05-03 08:00 How the query please! Richard Sitompul <richard@orbisindonesia.com>
2005-05-03 12:07 ` Re: How the query please! David A. Leedom <daleedom@hightowergroup.com>
2005-05-04 02:09 ` Re: How the query please! Richard Sitompul <richard@orbisindonesia.com>
2005-05-04 04:31 ` Re: How the query please! Johannes Lochmann <j.lochmann@i-penta.at>
@ 2005-05-04 04:55 ` Richard Sitompul <richard@orbisindonesia.com>
0 siblings, 0 replies; 5+ messages in thread
From: Richard Sitompul @ 2005-05-04 04:55 UTC (permalink / raw)
To: Johannes Lochmann <j.lochmann@i-penta.at>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2005-05-04 04:55 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-03 08:00 How the query please! Richard Sitompul <richard@orbisindonesia.com>
2005-05-03 12:07 ` David A. Leedom <daleedom@hightowergroup.com>
2005-05-04 02:09 ` Richard Sitompul <richard@orbisindonesia.com>
2005-05-04 04:31 ` Johannes Lochmann <j.lochmann@i-penta.at>
2005-05-04 04:55 ` Richard Sitompul <richard@orbisindonesia.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox