use select statement in decode function [message #455417] |
Tue, 11 May 2010 08:34  |
miroconnect@yahoo.com
Messages: 202 Registered: April 2006
|
Senior Member |
|
|
I am trying to use decode function in sql
and inside decode function can I use select statement ?
here is my sql
select we.wf_entity_id, decode(object_type_id,
1, select audit_number from ea_audit_general where sys_audit_id=object_id
2,'test',
object_type_id
) from wf_entity we
where
we.entry_id in
(SELECT entry_id
FROM os_currentstep
GROUP BY entry_id
HAVING ( COUNT(entry_id) > 1 ))
see this
decode(object_type_id,
1, select audit_number from ea_audit_general where sys_audit_id=object_id
2,'test',
object_type_id
)
will this work ? Its not working for me is there any other option ?
|
|
|
|
|