Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    15

    Unanswered: TRIGGER and SQLCODE

    Hi All,

    a simple question with triggers, how can I verify the SQLCODE in a trigger when issuing a simple select statement for example. I want to do something that looks like this:


    set v_ex = (select v from t where bla=3)
    if (sqlcode = 0 or sqlcode =100)
    then SIGNAL SQLSTATE 'this is an example'

    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Massachusetts, USA
    Posts
    106
    if not exists (select 1 from t where bla=3) then
    SIGNAL SQLSTATE 'this is an example'
    end if

  3. #3
    Join Date
    Aug 2004
    Posts
    330
    What is the purpose of this trigger?

Posting Permissions

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