hok1man
Technical User
- Feb 16, 2008
- 102
Hi guys,
I've got the script which contain sybase sql as below
The only way I can tell whether insert successful or not is via sybase return code.
if I do via sybase, I can simply do select @@ERROR,
but when it go out to unix.. the return code is 0, I understand that.
So, is there anyway to pass the value "select @@ERROR" OUT TO UNIX ?
Thanks guys,
I've got the script which contain sybase sql as below
Code:
#!/usr/bin/ksh
isql -S.. -U.. -P.. << SQL
INSERT INTO TABLE VALUES (...)
SQL
if INSERT in sybase successful
echo "success"
else
echo "fail"
The only way I can tell whether insert successful or not is via sybase return code.
if I do via sybase, I can simply do select @@ERROR,
but when it go out to unix.. the return code is 0, I understand that.
So, is there anyway to pass the value "select @@ERROR" OUT TO UNIX ?
Thanks guys,