Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > Re: How to chec...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 9 Topic 9091 of 9366
Post > Topic >>

Re: How to check SQLCODE in trigger

by "lenygold via DBMonster.com" <u41482@[EMAIL PROTECTED] > Jul 16, 2008 at 12:33 AM

I TRIED ONLY SP AND ALSO AN ERROR:

CALL execute_immediate('select * FROM FAMILY',out_sqlcode);

 CALL execute_immediate('select * FROM FAMILY',out_sqlcode)
SQL0206N  "OUT_SQLCODE" is not valid in the context where it is used.  
SQLSTATE=42703 
sqlcode: -206



lenygold wrote:
>Here is exable from book how to use this UDF/SP COMBO:
>
>WITH temp1 AS
>(SELECT tabschema
>,tabname
>FROM syscat.tables
>WHERE tabschema = 'FRED'
>AND type = 'S'
>AND status = 'C'
>AND tabname LIKE '%DEPT%'
>)
>SELECT CHAR(tab.tabname,20) AS tabname
>,stm.sqlcode AS sqlcode
>,CHAR(stm.sqltext,100) AS sqltext
>FROM temp1 AS tab
>,TABLE(execute_immediate(
>'REFRESH TABLE ' ||
>RTRIM(tab.tabschema) || '.' || tab.tabname
>))AS stm
>ORDER BY tab.tabname
>WITH UR;
>
>>Thank you very much SERGE for your help.
>>I found example in Graeme Birchall COOKBOOK wich i think exactly what i
need
>[quoted text clipped - 57 lines]
>>>Cheers
>>>Serge

-- 
Message posted via http://www.dbmonster.com
 




 9 Posts in Topic:
How to check SQLCODE in trigger
"lenygold via DBMons  2008-07-15 15:10:46 
Re: How to check SQLCODE in trigger
Serge Rielau <srielau@  2008-07-15 14:35:48 
Re: How to check SQLCODE in trigger
"lenygold via DBMons  2008-07-15 23:36:21 
Re: How to check SQLCODE in trigger
"lenygold via DBMons  2008-07-15 23:47:11 
Re: How to check SQLCODE in trigger
"lenygold via DBMons  2008-07-16 00:33:51 
Re: How to check SQLCODE in trigger
Serge Rielau <srielau@  2008-07-15 21:33:12 
Re: How to check SQLCODE in trigger
"lenygold via DBMons  2008-07-16 02:29:09 
Re: How to check SQLCODE in trigger
Serge Rielau <srielau@  2008-07-16 08:14:26 
Re: How to check SQLCODE in trigger
"lenygold via DBMons  2008-07-16 16:40:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 12:51:25 CDT 2008.