Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Trigger

Status
Not open for further replies.

Christi

Programmer
Dec 28, 2001
14
0
0
US
can someone please take a look at this trigger and explain to me why it is not working.
What I am trying to do is make sure that cursor is moved to a specific field before an update is done on that table.
the algorithm is like this:
pre-update trigger
before update on tableName
next_item = vdate;
this is how I coded it:

Trigger name PRE-UPDATE:

DECLARE
cur_itm VARCHAR280) := :System.Cursor_Item;
cur_blk VARCHAR2(80) := :System.Cursor_Block;
call_vdate VARCHAR2(80); -- this is the field on table

BEGIN
call_vdate := cur_blk||'.'||Get_Block_Propertycur_blk,LAST_ITEM);
IF cur_itm = call_vdate THEN
Next_Block;
ELSE
call_vdate := Next_Item;
END IF;
END;

It is kicking out some errors. can anyone help, please

 
Parenthesis!

Get_Block_Property(cur_blk,LAST_ITEM);
 
sem thank you for your response!
Actually, it did not compile. It is supposed to move cursor to column_name called call_vdate before any update is done. The parenthesis was fixed but I pasted the wrong code.
The problem is with this syntax: call_vdate := Nextt_Item;
Below is the correct code.

DECLARE
cur_itm VARCHAR280) := :System.Cursor_Item;
cur_blk VARCHAR2(80) := :System.Cursor_Block;
call_vdate VARCHAR2(80); -- this is the field on table

BEGIN
call_vdate := cur_blk||'.'||Get_Block_Property(cur_blk,LAST_ITEM);
IF cur_itm = call_vdate THEN
Next_Block;
ELSE
call_vdate := Next_Item;
END IF;
END;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top