If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 V8: Problem in Modifies SQL Data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-31-04, 05:18
deepaka deepaka is offline
Registered User
 
Join Date: Jan 2004
Posts: 20
db2 V8: Problem in Modifies SQL Data

Hi All,

I am running db2 V8, no fixpacks, on win 2k Prof. I am trying to put in the 'modifies sql data' clause in my function but the compiler says:

Multiple or conflicting keywords involving the "LANGUAGE SQL" clause
are present


I know that this was a problem with version 7 which was solved in fix pack 4 but has it reappeared in version 8? If not, the what is the solution?


Thanks and Regards,
Deepak Ajmera
Reply With Quote
  #2 (permalink)  
Old 01-31-04, 06:45
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: db2 V8: Problem in Modifies SQL Data

AFAIK, MODIFIES SQL DATA was not available in V7.2 or till V8 FP3 ... It was introduced in FP4

Cheers
Sathyaram


Quote:
Originally posted by deepaka
Hi All,

I am running db2 V8, no fixpacks, on win 2k Prof. I am trying to put in the 'modifies sql data' clause in my function but the compiler says:

Multiple or conflicting keywords involving the "LANGUAGE SQL" clause
are present


I know that this was a problem with version 7 which was solved in fix pack 4 but has it reappeared in version 8? If not, the what is the solution?


Thanks and Regards,
Deepak Ajmera
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-03-04, 02:39
deepaka deepaka is offline
Registered User
 
Join Date: Jan 2004
Posts: 20
Re: db2 V8: Problem in Modifies SQL Data

Quote:
Originally posted by sathyaram_s
AFAIK, MODIFIES SQL DATA was not available in V7.2 or till V8 FP3 ... It was introduced in FP4

Cheers
Sathyaram
Hi Sathyaram,

I tried installing fix pack 4 and now I am running db2 version 8 FP4 but still the error is persisting. The function is:

CREATE FUNCTION deepaka.FUNCTION1( )
RETURNS INTEGER
modifies sql data
------------------------------------------------------------------------
-- SQL UDF (Scalar)
------------------------------------------------------------------------
F1: BEGIN ATOMIC
insert into t1 values (11);
RETURN 1;
END

and it is not compiling. I tried scanning the docs but could not find the modifies sql data clause with the create function syntax. What's the problem? Solution?

Regards,
Deepak Ajmera
Reply With Quote
  #4 (permalink)  
Old 02-03-04, 03:42
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: db2 V8: Problem in Modifies SQL Data

Have you updated you documentation ?

With every fixpack, IBM releases a 'fix' for your documentation ...

Go to www.ibm.com/db2/library for the latest set of documents ...

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 02-03-04, 06:05
deepaka deepaka is offline
Registered User
 
Join Date: Jan 2004
Posts: 20
Re: db2 V8: Problem in Modifies SQL Data

Quote:
Originally posted by sathyaram_s
Have you updated you documentation ?

With every fixpack, IBM releases a 'fix' for your documentation ...

Go to www.ibm.com/db2/library for the latest set of documents ...

Cheers
Sathyaram
Hi Sathyaram,

Yes, the documentation says that "DB2 now supports use of SQL statements that modifydata within the body of SQL table functions" but still my function is giving me the same error. The db2level output is:

DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL08014" with
level identifier "02050106".
Informational tokens are "DB2 v8.1.4.341", "s031027", "WR21326", and FixPak
"4".
Product is installed at "C:\PROGRA~1\IBM\SQLLib".

What's going wrong? Please help as I am totally lost....


Regards,
Deepak Ajmera
Reply With Quote
  #6 (permalink)  
Old 02-03-04, 07:52
nitingm nitingm is offline
Registered User
 
Join Date: Jul 2003
Location: Austin, TX, USA
Posts: 278
Rebing Packages

Hi Deepak,

Just for a checklist... did you rebind all the necessary packages.

Do a db2rbind for all your databases probably that would make a difference.

HTH

nitin.
__________________
HTH

Nitin

Ask the experienced rather than the learned
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On