pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gurudutt <guru@indvalley.com>
To: pgsql-sql@postgresql.org
Subject: Joins~
Date: Wed, 21 Nov 2001 14:07:28 +0530
Message-ID: <13216589307.20011121140728@indvalley.com> (raw)

This may be just a re-post of my previous mail, but unfortunately, I
haven't got any reply whatsoever to this problem, Is the question too
easy to answer or what, I couldn't get what it meant. I am posting the
problem again, hopefully somebody will be able to give me a solution.

----------------------------------------------------------------------

I have two tables

1. tickettab
2. ticketmultab

Both the tables have arrivaldate and arrivaltime as fields

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

so depending on the arrival date and arrival time I need the result
set to be sorted.

I used bubble sort in php by moving the result set into an array and
then sorting it. Is there any other way to do this thru SQL.

-- 
Best regards,
 Gurudutt                            mailto:guru@indvalley.com

Life is not fair - get used to it.
Bill Gates




view thread (10+ messages)  latest in thread

Message-ID: <13216589307.20011121140728@indvalley.com>
Permalink:  ../13216589307.20011121140728@indvalley.com/
Also on:    postgresql.org/message-id/13216589307.20011121140728@indvalley.com

 · 

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: guru@indvalley.com
  Subject: Re: Joins~
  In-Reply-To: <13216589307.20011121140728@indvalley.com>

* 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