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 > Oracle convertion in Trigger statement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-09, 04:52
vivek.vivek vivek.vivek is offline
Registered User
 
Join Date: Jan 2009
Posts: 27
Question Oracle convertion in Trigger statement

How can i writes these two ststements in DB2 Trigger

I declared v_SQLtableConValue,v_SqlString and added REFERENCING NEW AS n.

v_SQLtableConValue:='Monitered_'||:NEW.Process_Ste p_ID;

v_SqlString:='CREATE TABLE Monitered_' || :NEW.Process_Step_ID || ' (Batch_Name varchar2(20),Time_Stamp timestamp)';
Reply With Quote
  #2 (permalink)  
Old 01-20-09, 05:27
tonkuma tonkuma is offline
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,193
SET v_SQLtableConValue = 'Monitered_' || n.Process_Step_ID;

SET v_SqlString = 'CREATE TABLE Monitered_' || n.Process_Step_ID || ' (Batch_Name varchar2(20),Time_Stamp timestamp)';

Statements supported in a trigger are:
CALL
FOR
full select
GET DIAGNOSTICS
IF
INSERT
ITERATE
LEAVE
MERGE
searched-delete
searched-update
SET Variable
SIGNAL
WHILE

Last edited by tonkuma; 01-20-09 at 05:30.
Reply With Quote
  #3 (permalink)  
Old 01-20-09, 05:31
vivek.vivek vivek.vivek is offline
Registered User
 
Join Date: Jan 2009
Posts: 27
bUT ITS SHOWING THE ERROR
DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: ||;FUNCTION
Reply With Quote
  #4 (permalink)  
Old 01-20-09, 05:32
vivek.vivek vivek.vivek is offline
Registered User
 
Join Date: Jan 2009
Posts: 27
OK I GOT THE OUTPUT . wE NEED TO ADD CHAR(NEW.Process_Step_ID ) INSTEAD OF NEW.Process_Step_ID
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