Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Posts
    1

    Cool Unanswered: Handling Error in Sybase

    I would like to do the same code in sybase, just like below:

    declare
    n number;
    begin
    n := 450/0;
    exception
    when others then
    null;
    end;

    I don't know how to handle errors in a trigger block.
    This trigger can't raise any errors, so I need to handle all errors.

    Thanks in advance.

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    declare @n numeric(10,5)

    set arithabort off
    select @n = 450/0
    if @@error <> 0 -- here 3607
    print "Error occured"
    else
    select @n

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •