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


|