如何编写代码? [英] How to write a code ?

查看:72
本文介绍了如何编写代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个存储过程,如果有不满足的客户端规则那么它应该输出为错误并跳过块..



我尝试了什么:



我试过GOTO但是在存储过程中我收到错误...

I need to write a stored procedure where there are client rules if they are not satisfied then it should output as error and skip the block..

What I have tried:

I have tried GOTO but in the stored procedure i'm getting error...

推荐答案

这是关于范围的全部内容:@ERR_MESSAGE在IF块内声明,并在ELSE块内访问。将声明移动到SP的顶部,错误将消失。
It's all about scope: @ERR_MESSAGE is declared inside the IF block, and accessed inside the ELSE block. Move the declaration to the top of the SP and the error will go away.


这篇关于如何编写代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆