pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Bertheau <twanger@bluetwanger.de>
To: Gurudutt <guru@indvalley.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Joins~
Date: 21 Nov 2001 12:57:59 +0100
Message-ID: <1006343880.29221.13.camel@entwicklung01.cenes.de> (raw)
In-Reply-To: <13216589307.20011121140728@indvalley.com>
References: <13216589307.20011121140728@indvalley.com>

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

maybe it works like this:

select * from (<join tickettab and ticketmultab however you want to) as
ticketjoined order by ticketjoined.arrivaldate, ticketjoined.arrivaltime

let me know if it works.

Markus Bertheau





view thread (10+ messages)  latest in thread

Message-ID: <1006343880.29221.13.camel@entwicklung01.cenes.de>
Permalink:  ../1006343880.29221.13.camel@entwicklung01.cenes.de/
Also on:    postgresql.org/message-id/1006343880.29221.13.camel@entwicklung01.cenes.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: twanger@bluetwanger.de, guru@indvalley.com
  Subject: Re: Joins~
  In-Reply-To: <1006343880.29221.13.camel@entwicklung01.cenes.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox