Unix:程序参数的问题

时间:2017-02-13 11:47:04

标签: unix ksh

我编写了一个plsql程序,其中有2个参数和1个参数。我在unix(ksh)中调用此过程但是如果我打印它只是读取out参数。我试图比较&#34中的out参数;如果"条件但它失败了。我已经按照以下方式写了它。

var v_test number;
exec procedurename (1,2,:v_test);

print v_test; ---this prints the value as 1 which is return by procedure

if [$v_test -eq 1]
then
Print"success";
Else
Print"try again"
End if;

但是在将v_test与1进行比较时,它会为v_test1 ...获取空值,并将empty与1进行比较并给出错误。 。有人可以帮我吗?

1 个答案:

答案 0 :(得分:-1)

尝试查看这个问题的答案,因为我认为它正在寻找

How to capture the result of stored procedure through shell script?