| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> sql select question
Hi guys,
this should be easy but i cannot figure out how to do this. The purpose of this is to create a view out of a name/value table and make each name a column.
create table tst
(
a integer, n varchar(10), v varchar(10)
insert into tst values(1, 'name1a', 'value1a'); insert into tst values(1, 'name1b', 'value1b'); insert into tst values(2, 'name2a', 'value2a'); insert into tst values(2, 'name2b', 'value2b');
select a, v from tst where a in (1);
which gives me:
A V
---------- ----------
1 value1a
1 value1b
What i want is to put the values associated with the same 'a' on 1 row. So i want to see 1 row consisting of '1, value1a, value1b'.
thanx in advance
anthony
Received on Fri Feb 14 2003 - 18:12:57 CST
![]() |
![]() |