create trigger ins_uomconv_trig
before insert or update on uom_conversion
for each row
begin
Declare as_xml varchar2(255),as_from_uom varchar2(20),as_to_uom varchar2(20),as_tab_name varchar2(50),as_oper varchar2(20);
as_from_uom = :new.from_uom;
as_to_uom = :new.to_uom;
as_tab_name := 'uom_conversion';
as_oper := 'INSERT';
as_xml := '<from_uom>'+:as_from_uom+'</from_uom>';
as_xml := :as_xml+'<to_uom>'+:as_to_uom+'</to_uom>';
end;
/
When I compile I get the following error.
PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> cursor
form current external language
Where am I going wrong?
Thanks