From: | Yasir Malik <ymalik(at)heineken(dot)cs(dot)stevens-tech(dot)edu> |
---|---|
To: | ronald(at)my(dot)msuiit(dot)edu(dot)ph |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: help me... |
Date: | 2003-11-09 20:53:35 |
Message-ID: | Pine.LNX.4.58.0311091551070.5237@heineken.cs.stevens-tech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
I'm usually wrong, but you can create a view for Query1 and Query2. That
is do
create view Query1 [your query for query1];
create view Query2 [your query for query2];
Then what you are doing should work.
Regards,
Yasir
On Sat, 8 Nov 2003, [iso-8859-1] ron_tabada wrote:
> Date: Sat, 8 Nov 2003 06:02:15 +0000 (GMT)
> From: "[iso-8859-1] ron_tabada" <ron_tabada(at)yahoo(dot)com>
> Reply-To: ronald(at)my(dot)msuiit(dot)edu(dot)ph
> To: pgsql-sql(at)postgresql(dot)org
> Subject: [SQL] help me...
>
> Hello everyone, Good day! Could anyone help me translate this query in Microsoft Access to Postgresql. I'm having a difficulty. Pls...
> Query1:
> SELECT items.description, Sum(supplieditems.qty) AS SumOfqty
> FROM items INNER JOIN supplieditems ON items.itemno = supplieditems.itemno
> GROUP BY items.description;
> Query2:
> SELECT [items].[description], Sum([customer].[qty]) AS SumOfqty
> FROM (items INNER JOIN OtherItem ON [items].[itemno]=[OtherItem].[Itemno]) INNER JOIN customer ON [OtherItem].[Itemno]=[customer].[itemcode]
> GROUP BY [items].[description];
> Query3:
> SELECT [Query1].[SumOfqty], [Query2].[SumOfqty], [Query1]![SumOfqty]-[Query2]![SumOfqty] AS remain
> FROM Query1, Query2;
> I have translated Query1 and Query2 in POSTGRESQL but I don't know how to implement Query3.
>
>
> ---------------------------------
> Want to chat instantly with your online friends?Get the FREE Yahoo!Messenger
From | Date | Subject | |
---|---|---|---|
Next Message | Yasir Malik | 2003-11-09 20:59:19 | Re: help me... |
Previous Message | Christopher Browne | 2003-11-09 20:36:38 | Re: transaction management in plpgsql functions |