|
-
Hello
If you want to use select statement in decode function
Given one example below.
Hope this will help you.
create table emp
(empno number,
ename varchar2(30),
status varchar2(10)
)
create or replace view empview(empno,ename,status,result)
as
select empno,ename,status,
decode((select status from emp a
where empno = b.empno),
'Male','Y',
'Female','N') result
from emp b
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
|