X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2C4DBD1B50C for ; Sat, 8 Nov 2003 06:02:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 81964-07 for ; Sat, 8 Nov 2003 02:02:17 -0400 (AST) Received: from web14605.mail.yahoo.com (web14605.mail.yahoo.com [216.136.224.85]) by svr1.postgresql.org (Postfix) with SMTP id CF948D1B4E6 for ; Sat, 8 Nov 2003 02:02:15 -0400 (AST) Message-ID: <20031108060215.7557.qmail@web14605.mail.yahoo.com> Received: from [202.133.205.50] by web14605.mail.yahoo.com via HTTP; Sat, 08 Nov 2003 06:02:15 GMT Date: Sat, 8 Nov 2003 06:02:15 +0000 (GMT) From: =?iso-8859-1?q?ron=5Ftabada?= Reply-To: ronald@my.msuiit.edu.ph Subject: help me... To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-168600147-1068271335=:6763" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.2 tagged_above=0.0 required=5.0 tests=HTML_10_20 X-Spam-Level: * X-Archive-Number: 200311/70 X-Sequence-Number: 15885 --0-168600147-1068271335=:6763 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 --0-168600147-1068271335=:6763 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
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 --0-168600147-1068271335=:6763--