473,396 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DB2,UDF,modifies sql data

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

Nov 12 '05 #1
4 5450
Modifies is not supported EEE...is that the case here?

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

Nov 12 '05 #2
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
Nov 12 '05 #3
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


Nov 12 '05 #4
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
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: db2sysc | last post by:
I am getting SQL0628N when I run function with INSERT and MODIFIES SQL DATA Version: DB2 v8.1.7.445 Fixpack 7. Create function test1( a int, b int) returns integer language sql
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
3
by: bbernieb | last post by:
Hi, All, Is it possible to access a variable inside of a data binding, without the variable being out of scope? (Note: On the DataBinder line, I get an error message that says "Name 'i' is...
2
by: alex.mcshane | last post by:
Hi - I would be grateful for any knowledge regarding the following. Whilst QAing Stored Procedures developed by colleagues, I noticed the following 'superflous' parameter specifications:- 1)...
17
by: lovecreatesbeauty | last post by:
1. In the following code, is the code (line 11) legal? Is there a notice in the document to tell callers that the parameter s1 should receive an array variable, i.e. type char, but not a variable...
2
by: 4.spam | last post by:
Hello. v8.2. Is it possible? Example: --------------- create function t(v varchar(1)) modifies sql data returns table(c varchar(1))
18
by: greenflame | last post by:
I want to make a function that does the following. I will call it thefunc for short. '||Char>>' I tried the following def thefunc(s): s = "||" + s + ">>"
2
by: casManG | last post by:
I am working on a small project that uses the treeview control in .net 2003. I have a tree view that I am sending to a sub in order to iterate through the nodes. Public Sub test (ByVal...
1
by: Bob | last post by:
Hi all, I've designed a database that has an events table and an application table. Each event has an application associated with it and I've stored an application code in the events table then...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.