pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vincent Hikida <vhikida@inreach.com>
To: Vincent Hikida <vhikida@inreach.com>
To: Steven Verhoeven <Steven.Verhoeven@dmbr.UGent.be>
To: pgsql-general@postgresql.org
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] sql question
Date: Sun, 13 Mar 2005 18:42:43 -0800
Message-ID: <00f301c5283f$8074dc00$6501a8c0@HOMEOFFICE> (raw)
References: <423190C1.5090406@dmbr.UGent.be>
	<003101c5283e$6bb20780$6501a8c0@HOMEOFFICE>

OOPs.

I mean

SELECT  t1.id
              ,  t1.fref
    FROM t1
UNION ALL
SELECT t1.id
              , t1.mref
    FROM t1
  ----- Original Message ----- 
  From: Vincent Hikida 
  To: Steven Verhoeven ; pgsql-general@postgresql.org ; pgsql-novice@postgresql.org 
  Sent: Sunday, March 13, 2005 6:34 PM
  Subject: Re: [NOVICE] [GENERAL] sql question


  SELECT  t1.id
                ,  t1.fref
      FROM t1
  UNION ALL
  SELECT t2.id
                , t2.mref
      FROM t2

    ----- Original Message ----- 
    From: Steven Verhoeven 
    To: pgsql-general@postgresql.org ; pgsql-novice@postgresql.org 
    Sent: Friday, March 11, 2005 4:36 AM
    Subject: [GENERAL] sql question


    Hi all 

    My table definition :

       id | fref      | mref
    ------+-----------+----------
      1   |     23    |   25
      2   |     24    |   28
      3   |     25    |   31
      4   |     26    |   34

    My problem : 
    i need a query that results in this :

       id |    ref
    ------+----------
      1   |     23   
      1   |     25
      2   |     24
      2   |     28
      3   |     25    
      3   |     31
      4   |     26    
      4   |     34


    Do I need a crosstab-query ?
    Who can help me ?



    -- 
    A computer is like an airconditioner. When windows open, it stops working !  
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 


    Steven Verhoeven, ICT Support Engineer 



          Department for Molecular Biomedical Research (DMBR)
          VIB - Ghent University 'Fiers-Schell-Van Montagu' building
          Technologiepark 927B - 9052 Ghent (Zwijnaarde)
          Belgium 
          Tel : +32-(0)9-33-13.606 
          Fax : +32-(0)9-33-13.609 E-mail : Steven.Verhoeven@dmbr.UGent.be 
          URL : http://www.dmbr.UGent.be 

view thread (71+ messages)  latest in thread

Message-ID: <00f301c5283f$8074dc00$6501a8c0@HOMEOFFICE>
Permalink:  ../00f301c5283f$8074dc00$6501a8c0@HOMEOFFICE/
Also on:    postgresql.org/message-id/00f301c5283f$8074dc00$6501a8c0@HOMEOFFICE

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: vhikida@inreach.com, Steven.Verhoeven@dmbr.UGent.be, pgsql-novice@postgresql.org
  Subject: Re: [NOVICE] sql question
  In-Reply-To: <00f301c5283f$8074dc00$6501a8c0@HOMEOFFICE>
  References: <423190C1.5090406@dmbr.UGent.be> <003101c5283e$6bb20780$6501a8c0@HOMEOFFICE> <00f301c5283f$8074dc00$6501a8c0@HOMEOFFICE>

* 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