Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Location
    Des Moines,IA
    Posts
    21

    Question Unanswered: How can i convert "Raise error " from sybase to UDB

    Hi ,

    Here is the issue on RAISE ERROR

    In SYBASE We have the stored proc similar to the following.

    create proc RaiseErrTest ()
    as
    begin
    insert into schema.tbl1 select col1,col2 from schema.tbl2 where col1 = 100

    if @@error != 0
    begin
    raiserror 99999 " Insert table failed!"
    rollback
    return -1001
    end

    end
    go

    For the above sql how can i write in UDB.
    I tried many ways but not able to achieve it...
    If some body helps me that will be great.

    thanks.
    sreeni.
    Sreeni
    Sr.DBA in SYBASE
    Wellsfargo Bank,
    Des Moines,
    IA

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    sreeni,
    Look at the SIGNAL SQLSTATE statement.

    Andy

Posting Permissions

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