Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 10 May 2002 @ 12:59:21 GMT

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

Subj:   Re: Where clause in insert macro
From:   Geoffrey Rommel

  I have a macro A_KFM043 to insert a row into a table. Then I was calling the macro R_KFM043 to insert a row into another table only if the conditions of my where clause are met.  

The trigger seems like a good idea, and you should be able to use "locking row for write", but I'll take your word for it that it doesn't work.

The condition in this case is a LIKE test on the input parameters. For this you will need to use a stored procedure. It would look something like this (untested!):

/*  facsect insert        */
insert into facsect
 (fac_terma, fac_termz)
 (:fac_terma, :fac_termz);
/*  facsect2 insert       */
if fac_terma like '%KZZ' or fac_termz like '%KZZ' then
   exec r_kfm043 (:fac_terma, :fac_termz);  /* or bring that code in line
here */


  <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: 15 Jun 2023