From: | "Vincent Hikida" <vhikida(at)inreach(dot)com> |
---|---|
To: | "Steven Verhoeven" <Steven(dot)Verhoeven(at)dmbr(dot)UGent(dot)be>, <pgsql-general(at)postgresql(dot)org>, <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: sql question |
Date: | 2005-03-14 02:34:59 |
Message-ID: | 003101c5283e$6bb20780$6501a8c0@HOMEOFFICE |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-novice |
SELECT t1.id
, t1.fref
FROM t1
UNION ALL
SELECT t2.id
, t2.mref
FROM t2
----- Original Message -----
From: Steven Verhoeven
To: pgsql-general(at)postgresql(dot)org ; pgsql-novice(at)postgresql(dot)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(dot)Verhoeven(at)dmbr(dot)UGent(dot)be
URL : http://www.dmbr.UGent.be
From | Date | Subject | |
---|---|---|---|
Next Message | Russell Smith | 2005-03-14 02:39:20 | Re: sql question |
Previous Message | John DeSoi | 2005-03-14 01:43:15 | Re: Postgres jobs mailing list? |
From | Date | Subject | |
---|---|---|---|
Next Message | Russell Smith | 2005-03-14 02:39:20 | Re: sql question |
Previous Message | Todd Lewis | 2005-03-12 22:50:41 | Re: complex queries |