|
-
try with the CASE which is similar to DECODE with additional feature.
Here is the example:
select deptno,comm,(case when (deptno=10 or comm is null ) then 'test case' else 'test' end) from emp order by 2,1;
here the o/p will be
deptno comm case
10 test case
20 test case
10 800 test case
20 300 test
hope u got the point.
Srinivas Reddy Tatireddy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|