John Holland wrote :

>while writing an update trigger for 7.4.3 build 007-000-030-320 i wanted to
>use the following code:

>   try
>      update <table> set <some int column> = 3 where <key> = <something>
>ignore trigger;
>      update <same table> set <some other int column> = 3 where <key> =
><something else> ignore trigger;
>   catch
>      if 100 = $rc then
>         continue execution;
>      else
>         stop(3, $errmsg);
>
>but while creatation it throws

>[SAP AG][SQLOD32 DLL][SAP DB]Syntax error or access violation;-5015
>POS(1866) Missing keyword:EXECUTE.
>SQLSTATE = 37000

>at the keyword execution.

>i wanted the code to perform both statements only if $rc = '100 no row
>found'
>am i using this correctly?

As far as I see there is just a little bug in your code, 
you should remove the semicolon before the 'else' of the stop statement : 

catch
    if 100 = $rc then
       continue execution
    else
       stop(3, $errmsg);

Regards,
Thomas

-- 
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to