Re: How the query please!

Lists: pgsql-admin
From: "Richard Sitompul" <richard(at)orbisindonesia(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: How the query please!
Date: 2005-05-03 08:00:52
Message-ID: 33995.202.81.37.29.1115107252.squirrel@202.81.37.29
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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


From: "David A(dot) Leedom" <daleedom(at)hightowergroup(dot)com>
To: "Richard Sitompul" <richard(at)orbisindonesia(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: How the query please!
Date: 2005-05-03 12:07:40
Message-ID: 6.1.2.0.2.20050503080723.03272f48@mail.hightowergroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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


From: "Richard Sitompul" <richard(at)orbisindonesia(dot)com>
To: "David A(dot) Leedom" <daleedom(at)hightowergroup(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How the query please!
Date: 2005-05-04 02:09:46
Message-ID: 33263.202.81.37.29.1115172586.squirrel@202.81.37.29
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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
>


From: Johannes Lochmann <j(dot)lochmann(at)i-penta(dot)at>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: How the query please!
Date: 2005-05-04 04:31:47
Message-ID: 200505040631.48380.j.lochmann@i-penta.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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


From: "Richard Sitompul" <richard(at)orbisindonesia(dot)com>
To: "Johannes Lochmann" <j(dot)lochmann(at)i-penta(dot)at>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How the query please!
Date: 2005-05-04 04:55:54
Message-ID: 33787.202.81.37.29.1115182554.squirrel@202.81.37.29
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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(at)postgresql(dot)org
>

--
>>Richard Sitompul<<
Software Engineer
PT. Orbis Indonesia
http://www.orbisindonesia.com
http://richardsstp.3wsi.net