Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Hierarchical query
Hi,
I'm new to this group..but always love to play with database
here is a short and sweet solution 4 u
try it out....(this is well working in SQL Server 2000 and i wish it
should work in Oracle
also)
select col2, (case when col2='E1' or col2='E2' or col2='E3' then 'Salary' else 'Benefit' end ) as 'test1' from test where col1 not in (4,9)
col2 test1
---------- -------
E1 Salary E2 Salary E3 Salary E4 Benefit E5 Benefit E6 Benefit E7 Benefit
Regards
Kerul
Received on Mon Mar 21 2005 - 23:12:40 CST
![]() |
![]() |