|
-
A slight change in your query since you are anyway putting a filter on deptno:
select * from emp
where deptno = &dpt
order by decode(deptno,10,ename,
20,hiredate||','||job||','||sal,
30,deptno||','||ename,'')
Another observation is if you are already putting a filter on deptno, the sorting order for deptnos 10 and 30 pretty much amounts to the same, i.e., it would be on ename.
Cheers!
OraKid.
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
|