Trying to do something as data would be uploaded and edited in grid. At present I am using Ora_Hash.
owa_opt_lock.checksum('HR','EMPLOYEES', e.rowid) As HashForThisRow
FROM EMPLOYEES e;
No you can't.
owa_opt_lock.checksum is a function which is used for optimist locking. It locks the row(probably by using Select FOR Update mechanism) which you select and which you are trying to update. As a result, what you are eventually trying to do is that inside a Select query you are using a function that is locking the rows, which is not allowed. And thus your query will fail with the below mentioned error.
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "SYS.DBMS_SQL", line 1575
ORA-06512: at "SYS.OWA_OPT_LOCK", line 172
14551. 00000 - "cannot perform a DML operation inside a query "
*Cause: DML operation like insert, update, delete or select-for-update
cannot be performed inside a query or under a PDML slave.
*Action: Ensure that the offending DML operation is not performed or
use an autonomous transaction to perform the DML operation within
the query or PDML slave.