Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    27

    Question Unanswered: 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)';

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    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 06:30.

  3. #3
    Join Date
    Jan 2009
    Posts
    27
    bUT ITS SHOWING THE ERROR
    DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: ||;FUNCTION

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •