shreedhar wrote:
> Hi Joe,
>
> Thanks Alot,
>
> I followed how u said, then if I execute the same insert statement the
> following error is occuring.
>
> ERROR : Parse error at or near "empname"
>
> As I Check I didnot find any parse error there. This is error is occuring if
> and only if 'emp' table have trigger. Is there any problem in function
> 'aa_emp_stamp()'
I don't know what aa_emp_stamp() looks like. The function you sent in the
other day was called emp_stamp() -- is that the same? If so, you were missing
as ";":
DECLARE
current_user text;
BEGIN
-- Check that empname and salary are given
IF NEW.empname ISNULL THEN
RAISE EXCEPTION ''empname cannot be NULL value'';
END IF;
IF NEW.salary ISNULL THEN
RAISE EXCEPTION ''% cannot have NULL salary'', NEW.empname;
ELSE
current_user := NEW.empname;
END IF
^^^^
missing a ;
Joe