We can have parameterized Macro in Teradata as:-
CREATE MACRO MY_MACRO(PAR_EMP_NO INTEGER) AS
(
SELECT * FROM PROD.EMPLOYEE
WHERE EMP_NO=PAR_EMP_NO;
);
To execute parameterized Macro:-
EXEC MY_MACRO(10);
CREATE MACRO MY_MACRO(PAR_EMP_NO INTEGER) AS
(
SELECT * FROM PROD.EMPLOYEE
WHERE EMP_NO=PAR_EMP_NO;
);
To execute parameterized Macro:-
EXEC MY_MACRO(10);
No comments:
Post a Comment