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 C2ABBD1BA81 for ; Sat, 3 Jan 2004 04:34:03 +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 03722-10 for ; Sat, 3 Jan 2004 00:33:14 -0400 (AST) Received: from localhost.localdomain (unknown [166.70.154.50]) by svr1.postgresql.org (Postfix) with ESMTP id BC48BD1BCC6 for ; Sat, 3 Jan 2004 00:33:02 -0400 (AST) Received: from [127.0.0.1] (strongbad [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id i034WqxL004960; Fri, 2 Jan 2004 21:32:53 -0700 In-Reply-To: <85E086DE-3D99-11D8-A298-000A95C88220@myrealbox.com> References: <003a01c3d1a5$0cb603d0$0201a8c0@andy2> <85E086DE-3D99-11D8-A298-000A95C88220@myrealbox.com> Mime-Version: 1.0 (Apple Message framework v609) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: "Andy Lewis" , From: Adam Ruth Subject: Re: sort by on two columns Date: Fri, 2 Jan 2004 21:32:51 -0700 To: Michael Glaesemann X-Mailer: Apple Mail (2.609) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/14 X-Sequence-Number: 16407 Sounds like you may want to concatenate the columns: ... order by table1.name || table2.name The sorting would then be performed on both of the them as though they were one column. Adam Ruth On Jan 2, 2004, at 8:04 PM, Michael Glaesemann wrote: > > On Jan 2, 2004, at 8:55 PM, Andy Lewis wrote: >> Yes, I understand this but, I would like to have the results of both >> "table1.name, table2.name" >> sorted as one column. >> >> Is this possible? > > So you want one column of name, including names from both table1 and > table2? In that case, you need to use UNION, I believe. If it's > something else, I'm not sure I understand what you're asking. Perhaps > you could include a sample of what you're getting, along with what > you'd like to see? > > Michael Glaesemann > grzm myrealbox com > > > ---------------------------(end of > broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings >