Hi folks,
I am facing one problem with v$sql, i need to store updating sql query in temp table when one trigger get fired on some update sql statement.
but with "sql_text" , i am not getting correct update statement in temp table.
I am getting sql_text with this cursor statement.
select ltrim(sq.sql_text)
from v$sql sq,
v$session se,
v$open_cursor oc
where sq.address = oc.address and
se.saddr = oc.saddr and
se.sid = oc.sid and
se.audsid = SYS_CONTEXT('userenv','sessionid');
while i am firing update statement like this
update so_schdg_call set SCHDG_CALL_STATUS__CODE='01' where so_sub_item__id='2021S00552.1.1'; - through trigger this statement should stored in temp table.
while looking the temp table content
select * from TMPSOSCHDGCALLLOG where so_sub_item__id='2021S00552.1.1';
i am getting statement like this -
2021S00552.1.1 SICOMDBA amitps update so_schdg_call set SCHDG_CALL_STATUS__CODE='01' where so_sub_item__id='1018202235.249.1
while statement should print like -
update so_schdg_call set SCHDG_CALL_STATUS__CODE='01' where so_sub_item__id='2021S00552.1.1';
Please advise why this type of descripency occurs with v$sql.
Thanks
Amit