Quantcast
Viewing all articles
Browse latest Browse all 3273

Re: IQ 16 - How can I debug a stored procedure step by step?

Hi,

 

How about using a MESSAGE statement in the middle of the procedure ?

For example,

 

begin

        declare @sid_l int ;

        select @sid_l = 10 ;

        insert jerry(sid)  values(@sid_l) ;

        commit ;

 

 

        select sid into @sid_l from jerry where rowid(jerry) = 1 ;

        message ' SELECTED' ,@sid_l type info to LOG ;

        insert jerry(sid) values(@sid_l) ;

        commit ;

end

 

You can change the destination of the message.

And, you can also put it anywhere you want to check values of some variables in a procedure.

Please refer to a manual page below for details about the MESSAGE statement.

 

MESSAGE Statement - Reference: Statements and Options - SAP Library

 

Best regards,

Jerry


Viewing all articles
Browse latest Browse all 3273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>