pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Abdul Wahab Dahalan <wahab@mimos.my>
To: pgsql-sql@postgresql.org
Subject: Query Problem
Date: Thu,  7 Apr 2005 15:16:26 +0800 (MYT)
Message-ID: <5039595.1112858186520.SLOX.WebMail.wwwrun@openx.mimos.my> (raw)

If I've 2 tables like this:

Country table : with 2 fields (country and id)

Country             id
England            E
France               F
Japan                J

FlightTo table : with 2 fields(Flight ID and Destination)

FlightID            Destination
B1                     E,J
B2                     E,F
B3                     J,F


How do I make a query, so that I can get a result something like this :

FlightID          CountryVisited
B1                    England,Japan
B2                    England,France
B3                    Japan, France


Any help very much appreciated. Thanks








view thread (17+ messages)  latest in thread

Message-ID: <5039595.1112858186520.SLOX.WebMail.wwwrun@openx.mimos.my>
Permalink:  ../5039595.1112858186520.SLOX.WebMail.wwwrun@openx.mimos.my/
Also on:    postgresql.org/message-id/5039595.1112858186520.SLOX.WebMail.wwwrun@openx.mimos.my

 · 

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: wahab@mimos.my
  Subject: Re: Query Problem
  In-Reply-To: <5039595.1112858186520.SLOX.WebMail.wwwrun@openx.mimos.my>

* 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