X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3AE3ED1DF89 for ; Sat, 3 Jan 2004 02:10:23 +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 88339-07 for ; Fri, 2 Jan 2004 22:09:40 -0400 (AST) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by svr1.postgresql.org (Postfix) with ESMTP id 8116FD1CA3E for ; Fri, 2 Jan 2004 21:15:43 -0400 (AST) Received: from andy2 (c-24-1-39-92.client.comcast.net[24.1.39.92]) by comcast.net (sccrmhc12) with SMTP id <2004010301154901200e9jqpe>; Sat, 3 Jan 2004 01:15:50 +0000 From: "Andy Lewis" To: Subject: sort by on two columns Date: Fri, 2 Jan 2004 19:15:49 -0600 Message-ID: <002101c3d197$20082f20$0201a8c0@andy2> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0022_01C3D164.D56DBF20" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=HTML_60_70 X-Spam-Level: X-Archive-Number: 200401/9 X-Sequence-Number: 16402 This is a multi-part message in MIME format. ------=_NextPart_000_0022_01C3D164.D56DBF20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi All, Is it possible to sort by two columns? Using the query below? SELECT table1.name, table2.name, FROM table1, table2 WHERE table1.id = table2.id ORDER BY I want to be able to sort the names select from two different tables and two different colums(same data type). Is this possible? Thanks, Andy ------=_NextPart_000_0022_01C3D164.D56DBF20 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
Hi=20 All,
Is it pos= sible to=20 sort by two columns? Using the query below?
 
SELECT ta= ble1.name,=20 table2.name, <other selected columns> FROM table1, table2 W= HERE=20 table1.id =3D table2.id ORDER BY <what?>
 
I want to= be able to=20 sort the names select from two different tables and two different colums(sa= me=20 data type).
 
Is this= =20 possible?
 
Thanks,
 
Andy
------=_NextPart_000_0022_01C3D164.D56DBF20--