Received: from gateway.indvalley.com (ptil-134-144-ban.primus-india.net [203.196.144.134] (may be forged)) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAN6Vbm04685 for ; Fri, 23 Nov 2001 01:31:38 -0500 (EST) (envelope-from guru@indvalley.com) Received: from GURU ([192.168.0.20]) by gateway.indvalley.com (8.11.2/8.11.2) with ESMTP id fAMAmgF00817; Thu, 22 Nov 2001 16:19:37 +0530 Date: Thu, 22 Nov 2001 16:10:18 +0530 From: Gurudutt X-Mailer: The Bat! (v1.52f) Reply-To: Gurudutt Organization: Indus Valley X-Priority: 3 (Normal) Message-ID: <10524699358.20011122161018@indvalley.com> To: Markus Bertheau CC: pgsql-sql@postgresql.org Subject: Re: Joins~ In-Reply-To: <1006343880.29221.13.camel@entwicklung01.cenes.de> References: <13216589307.20011121140728@indvalley.com> <1006343880.29221.13.camel@entwicklung01.cenes.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200111/330 X-Sequence-Number: 5712 Hello Markus, Doesn't seem to be working, markus , I tried this query -- QUERY --- select tickettab.tokenid, ticketmultab.techcode,ticketmultab.techcode, tickettab.problemstmt,ticketmultab.problemstmt from (tickettab LEFT JOIN ticketmultab ON tickettab.tokenid=ticketmultab.tokenid) as ticketjoinedtab order by ticketjoinedtab.arrivaldate desc, ticketjoinedtab.arrivaltime desc --- END QUERY -- Error I got is ---- ERROR ---- ERROR: Column reference "arrivaldate" is ambiguous ------ END ERROR -- Are there any modifications that I need to do, to the query. Thanks for the reply -- Best regards, Gurudutt mailto:guru@indvalley.com Life is not fair - get used to it. Bill Gates Wednesday, November 21, 2001, 5:27:59 PM, you wrote: MB> On Wed, 2001-11-21 at 09:37, Gurudutt wrote: >> I want to sort the combination of the result set, like >> suppose an entry exists in tickettab as 2001-11-12 12:30 >> and the next entry in tickettab is 2001-11-12 16:40 >> >> if there exists a entry in ticketmultab as 2001-11-12 13.30 >> then I should get the results as follows >> >> >> ticketid arrival date arrival time >> >> 1 2001-11-12 12:30:00 -- tickettab entry >> 2 2001-11-12 13:30:00 --ticketmultab entry >> 3 2001-11-12 16:40:00 -- tickettab entry MB> maybe it works like this: MB> select * from ( ticketjoined order by ticketjoined.arrivaldate, ticketjoined.arrivaltime MB> let me know if it works. MB> Markus Bertheau MB> ---------------------------(end of broadcast)--------------------------- MB> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org