M.P.Dankoor wrote:
> devil live wrote:
>> how can I write a query to get right ingredients of a product basis on
>> production_no field
>>
>> such as;
>>
>> first check production_no if product_tree_special table if not found
>> then look at template table...
>>
>> What are your suggestions?
>>
I
On 1/11/07, devil live <[EMAIL PROTECTED]> wrote:
NOW : product_tree_template table is the default table for production
ingredients of the PRODUCT
but sometimes my customer using special product_tree table for some
production_no
how can I write a query to get right ingredients of a product bas
I think that the simplest solution is to use an union e.g:
select PRD.product_code
,PRD.product_name
,NULL::intAS production_no
,PTT.stock_code_to_make_product
,PTT.amount
from product PRD
,product_tree_template PTT
where 1 = 1
AND PRD.product_code = PTT.
I want to write sql statement about product, product_tree_special,
product_tree_template
product has
product_code varchar(20) PRIMARY KEY,
product_name varchar(20)
product_tree_template has
product_code varchar(20) PK,
stock_code_to_make_product(20) PK,
amout float4
product_tree_spci
On 1/11/07, Steve Sabljak <[EMAIL PROTECTED]> wrote:
select cf.flight_id, tl1.num_legs, cf.cmp_flight_id, tl2.num_legscmp_num_legs
from cmp_flight cf
join (select fl1.flight_id fid1, count(*) num_legs
from flight_leg fl1 group by fl1.flight_id) tl1 on fid1 =
cf.flight_id
join (
On Thu, Jan 11, 2007 at 07:50:19 +0900,
John Summerfield <[EMAIL PROTECTED]> wrote:
>
> I've perused my book (Mastering SQL by Martin Gruber), the postgresql
> docs (I have versions here on RHEL (Centos) 4, FC5,6, Debian Testing -
> up to 8,1) and I don't see how to choose the entry for the firs
Hi,
I've got a table which models the relationship between flights and
legs, which is defined like this:-
create table flight_leg (
flight_id integer references flight(id),
leg_id integer references leg(id)
);
One leg may be part of many flights and one flight may be made up of 1
or more
Marc Mamin wrote:
Hello,
I need to generate some procedures that depend data models stored in my
DBs.
As I have different models in different databases, the stored procedures
will differ.
My idea is to generate the required stored procedures dynamically once a
model is defined.
I will pro
Hello,
I need to generate some procedures that depend data models stored in my
DBs.
As I have different models in different databases, the stored procedures
will differ.
My idea is to generate the required stored procedures dynamically once a
model is defined.
I will probably do this within