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 6888FD1BABA for ; Wed, 21 Apr 2004 20:43:25 -0300 (ADT) 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 94952-02 for ; Wed, 21 Apr 2004 20:43:22 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id F3109D1B967 for ; Wed, 21 Apr 2004 20:43:18 -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 i3LNhISx012665 for ; Wed, 21 Apr 2004 23:43:18 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i3LNfs4l012515 for pgsql-sql@postgresql.org; Wed, 21 Apr 2004 23:41:54 GMT From: blake@shopwhatcom.com (Blake) X-Newsgroups: comp.databases.postgresql.sql Subject: Proper SQL syntax requested Date: 21 Apr 2004 16:41:57 -0700 Organization: http://groups.google.com Lines: 15 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=NO_DNS_FOR_FROM X-Spam-Level: * X-Archive-Number: 200404/287 X-Sequence-Number: 17662 Wondering if anyone can help me with the proper syntax for an ORDER BY clause with a subquery. What I have is a table column named make in one table. The make column contains a Serial ID of the name which is stored in an alternate table named sections. I am trying to be able to ORDER by on make, but as you can guess it is ORDERING by the ID rather than the actual Name. Select * from floors Where system = 1 ORDER by make This sorts by the Serial ID's in column make I would like to be able to sort by the actual Names associated back from the ID's. Anyway of doing this?? Thanks All for the Help!