Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 15 Jun 2012 @ 12:23:53 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Cursor Inside a trigger
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, June 15, 2012 05:49 -->

Hi ,

I am trying to create a cursor inside a Trigger.

The syntax is as given below.

     REPLACE TRIGGER TRIGGER_TEST_TRIG_2
        AFTER DELETE ON TRIGGER_TEST
        REFERENCING OLD_TABLE AS OT FOR EACH STATEMENT (
           FOR ACUR AS ACUR_CURSOR FOR
                           SELECT ID, NAME
                           FROM OT
           DO
                           INSERT INTO TRIGGER_TEST_LOG
                           SELECT ACUR.ID, ACUR.NAME ;
           END FOR ;

     ) ;

I am getting a constant Syntax error "3706: Syntax error: expected something between '(' and the 'FOR' keyword. " I am unable to guess as to what am I missing .


Thanks in advance



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016