Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / January 2005

Tip: Looking for answers? Try searching our database.

DB2,UDF,modifies sql data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
amoL - 19 Jan 2005 09:36 GMT
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
Sean McKeough - 19 Jan 2005 15:34 GMT
Modifies is not supported EEE...is that the case here?

> when specifying modifies sql data option ...
> getting following error..
[quoted text clipped - 11 lines]
> So cant we modifies data through an UDF ( external UDF) ?
> - amoLpujari
Serge Rielau - 19 Jan 2005 21:56 GMT
> when specifying modifies sql data option ...
> getting following error..
[quoted text clipped - 11 lines]
> 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

Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

mailar@gmail.com - 20 Jan 2005 05:06 GMT
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

> > when specifying modifies sql data option ...
> > getting following error..
[quoted text clipped - 20 lines]
> Cheers
> Serge
Serge Rielau - 20 Jan 2005 12:55 GMT
> Hey Serge,
> You mentioned, one can CALL a procedure but my doubt is ; can the
[quoted text clipped - 34 lines]
>>Cheers
>>Serge

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

Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.