Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 10 May 2002 @ 12:53:48 GMT


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


Subj:   Re: Where clause in insert macro
 
From:   Ulrich Arndt

Hi,

This will not work always but sometimes - depending on the exact question. Hope the example explains himself.

Kind regards

Ulrich

Example:
create table a
( a varchar(100) );

create table b
( a varchar(100) );

REPLACE MACRO M_where
  (
      a varchar(100) NOT NULL  )
  AS
  (

        insert into a values (:a);

        insert into b select * from a where a =  :a and a not like 'A%';

  );

exec m_where ('SDKK');
exec m_where ('ADKK');

sel * from a;
sel * from b;

drop table a;
drop table b;
drop macro m_where;


     
  <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