Archives of the TeradataForum
Message Posted: Fri, 10 May 2002 @ 12:53:48 GMT
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;
|