Skip site navigation (1) Skip section navigation (2)

solved Re: view problem - too many rows out

From: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: solved Re: view problem - too many rows out
Date: 2004-05-12 14:06:35
Message-ID: 200405121506.35979.gary.stainburn@ringways.co.uk (view raw or flat)
Thread:
Lists: pgsql-sql
On Wednesday 12 May 2004 11:02 am, Gary Stainburn wrote:
> Hi folks.
>
[snip]
> create view order_summary as
>   select
>       c.cs_id, cs.count as qty, c.cs_make, c.cs_code, c.cs_type,
> cst.cst_desc, c.cs_colour,
>       o.or_id,
>       o.or_supp, o.or_date, o.or_received, o.or_no, orst.orst_desc as
> order_state,
>       co.co_id, co.co_name, co.co_person, co.co_tel,
>       co.co_mobile, co.co_fax, co.co_email, co.co_type,
>       c.cs_comments
>     from consumables c, orders o,
>         (select cost_cs_id, cost_or_id, count(cost_cs_id) from cons_stock
>            where cost_or_id is not null
>            group by cost_cs_id, cost_or_id
>         ) cs, contacts co,
>          cons_locations cl, cons_types cst, order_states orst

cons_locations shouldn't have been there

>     where cs.cost_cs_id = c.cs_id
>       and cs.cost_or_id = o.or_id
>       and c.cs_type = cst.cst_id
>       and o.or_supp = co.co_id
>       and o.or_state = orst.orst_id;
[snip]

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


In response to

pgsql-sql by date

Next:From: Theodore PetroskyDate: 2004-05-12 17:57:50
Subject: where is this problem (trigger)
Previous:From: scott.marloweDate: 2004-05-12 13:59:10
Subject: Re: working with schema

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group