This content has been marked as final. Show 6 replies
ı have two different database block, both have a column named SCL_DATE.
In pre-insert trigger of BLOCK1 I write sth like this : BLOCK1.SCL_DATE = SYSDATE;
And in pre-insert trigger of BLOCK2 I write sth like this : BLOCK2.SCL_DATE = SYSDATE;
But ı wonder if ı can write a procedure such as :SYSTEM.CURRENT_BLOCK.SCL_DATE = SYSDATE and can I use this procedure in pre-insert trigger of two blocks. I tried but this syntax didn't work.
:SYSTEM.CURRENT_BLOCK return values, you code will give error. Try
..... variable_name:=:SYSTEM.CURRENT_BLOCK; variable_name||.SCL_DATE=sysdate;
Hope this helps
pls share us the procedure u tried cause what u tried is not a syntax procedure if u tried it as i thought more simply u can use different solution to achieve this..
:blockname1.urdate := sysdate ;there is a property called copy value in the date item property of ur dsteitem in second block here u can write the date item name of the block1 where it has sysdate .
u can use different triggers as ...
post or per text item or when validate item triggersin order to assign the sysdate to date on block1
I have the solution, ı used copy.
Here is my whole procedure
PROCEDURE LOG_UPDATE IS
CUR_VAL_TRH := :SYSTEM.CURRENT_BLOCK||'.UPD_ISL_TRH';
SELECT TO_CHAR(SYSDATE,'DD/MM/YYYY HH24:MI')
thanks for all replies