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 5F320D1B524 for ; Sun, 19 Oct 2003 17:14:07 +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 23937-02 for ; Sun, 19 Oct 2003 14:13:37 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id C6506D1B51E for ; Sun, 19 Oct 2003 14:13:36 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id h9JHDLNu058333 for ; Sun, 19 Oct 2003 17:13:21 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h9JGuY4g055788 for pgsql-sql@postgresql.org; Sun, 19 Oct 2003 16:56:34 GMT From: =?ISO-8859-2?Q?Ada=B6?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.sql Subject: problem with sql Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 11 Message-ID: Date: Sun, 19 Oct 2003 16:56:10 GMT X-Complaints-To: abuse@chello.pl Organization: Customers chello Poland To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/324 X-Sequence-Number: 15724 Hello to everyone, In my own database, I linked customers table with orders table using one-to-many relation. I need to check status of last order for each customer and then set customer's status. I made a query using LAST and GROUP BY to select last order for each customer and I wanted to use it in UPDATE query, but it seems to be impossible. Is here anybody who knows how to solve this problem? (I work with MS Access). Adam