ma****@gmail.com wrote:
Hey Serge,
You mentioned, one can CALL a procedure but my doubt is ; can the
procedure being called be a JAVA procedure?
Also, the table function that can CALL another procedure need to be a
SQL table function or it can be a external table function as well?
mailar
Serge Rielau wrote:
amoL wrote:
when specifying modifies sql data option ...
getting following error..
SQL0104N An unexpected token "MODIFIES SQL DATA" was found
following
"".
Expected tokens may include: "READS SQL DATA". LINE NUMBER=13.
SQLSTATE=42601
where I have some code in external UDF that creates a table in
database.
when specifying READS SQL DATA getting SQLCODE 577.
So cant we modifies data through an UDF ( external UDF) ?
- amoLpujari
DB2 V8.1.4 for LUW supports SQL Table functions which MODIFY SQL
DATA.
Starting with DB2 V8.2 for LUW you could CALL a procedure within the
table function. That procedure then, conceivably, could do DDL.
However Doing DDL inside of an SQL statement is rather ... bizarre.
Mind to explain the motivation?
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Today only SQL Table functions are allowed. In principle I don't think
anything speaks against allowing this for external table functions.
We'd have to destroy the pipelining though because the compiler cannot
assess read/write conflicts. I.e. in a FROM T, TABLE(foo(T.c1)) AS F
You would see a TEMP above T and one above F (playing SQL by the rules).
There is no limitation on the language of procedures or functions called
by another function or procedure. For all DB2 cares you can call a CLR
routine.
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab