473,385 Members | 1,267 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,385 software developers and data experts.

CALL in TRIGGER and SQLCODE -746

Hi All,

I'd like to get feedback (through email) from folks who use CALL in
Trigger and do or do not get in trouble with the -746 SQLCODE:

SQL0746N Routine "<routine-name>" (specific name
"<specific-name>") violated nested SQL statement rules
when attempting to perform operation "<operation>" on
table "<table-name>".

Cheers
Serge
Nov 12 '05 #1
1 2716
Hello Serge,
(Using DB2 8.2/Linux)
Hi All,

I'd like to get feedback (through email) from folks who use CALL in Trigger and do or do not get in trouble with the -746 SQLCODE:
SQL0746N Routine "<routine-name>" (specific name "<specific-name>") violated nested SQL statement rules when attempting to perform
operation "<operation>" on table "<table-name>".
Cheers
Serge


Here you've got it:

create table a (a integer)
@
create procedure b1(i_a integer)
begin
insert into a values (i_a);
end
@
create table b (a integer)
@
create trigger t_b after insert on b referencing new as nuevo for each
row mode db2sql
begin atomic
call b1(nuevo.a);
call b1(nuevo.a);
--insert into a values (nuevo.a);
--insert into a values (nuevo.a);
end
@
insert into b values (0)
@
insert into b values (1)
@
insert into b values (2)
@
select * from a
@
drop table b
@
drop procedure b1
@
drop table a
@
drop trigger t_b
@

Commenting the CALLs and uncommenting the INSERTs works fine. CALL
works if there's only one CALL.
Needless to say I'm desperate with this one.

Nov 12 '05 #2

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

Similar topics

2
by: Tborn2b | last post by:
DB2 V 7, Z/OS: I receive an SQLCODE -104 for the following trigger : CREATE TRIGGER TRSERED1 NO CASCADE BEFORE INSERT ON SEMINAR REFERENCING NEW AS ZUGANG
4
by: Paul Reddin | last post by:
Hi, Having just tested our database on V8.2 we get the following apparent incompatibility. A Trigger conatains the following line CREATE TRIGGER JABS.AU_CHNG_ENQUIRYITM AFTER UPDATE OF ..
6
by: JohnO | last post by:
Hi Folks, I have an update trigger that fails (it inserts an audit table record) in some circumstances. This is causing the triggering transaction to fail and roll back. Is there any way to...
5
by: Bob Stearns | last post by:
I have two (actually many) dates in a table I want to validate on insertion. The following works in the case of only one WHEN clause but fails with two (or more), with the (improper?...
2
by: mob1012 via DBMonster.com | last post by:
Hi All, I wrote last week about a trigger problem I was having. I want a trigger to produce a unique id to be used as a primary key for my table. I used the advice I received, but the trigger is...
4
by: Pakna | last post by:
Hi, is there any way to call a JAVA stored procedure from a SQL Trigger? We are having difficulties with this and cannot verify whether DB2 even *has* this capability? Thank you very much....
2
by: Massimiliano Campagnoli | last post by:
I would like to signal a warning from a trigger but what I get it's always and error instead of a warning. Is it possible to signal a warning from a trigger ? ..... SIGNAL SQLSTATE '01ZZZ'...
3
by: cberthu | last post by:
Hi all, Is it possible to have two connects in the same rexx script to different DB's? I have to get data form on DB (with specifics selects and filter out some values with RExx) and save the...
2
by: lenygold via DBMonster.com | last post by:
Hi Everebody: I have a table: CREATE TABLE CROSS_REFERENCE (ROW# INTEGER NOT NULL ,KEY_WORD CHAR(16) NOT NULL ,QUERY_DESCR VARCHAR(330) NOT NULL ,PRIMARY KEY (ROW#,KEY_WORD)); It is a...
1
by: amijai11 | last post by:
I am getting following error for a trigger, please let me know if anyone knows how to fix the problem. Thks in advance for the help. SQLCODE = -20100, ERROR: AN ERROR OCCURRED WHEN BINDING A...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...

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.