You can refer to the Stored procedure documentaion for detail reference. Here is the link
www.info.teradata.com/edownload.cfm?itemid=113480020
The stored procedure support both the INSERT and UPDATE SQL statements just like you are doing in any other scripts. Here is a very basic example showing how things work in stored procedure...
REPLACE PROCEDURE DP_CCP.IC_AGLD_CCP(OUT Ret_Cd INTEGER)
L1: BEGIN
DECLARE AGG_ALL_MAX_ROW_DT DATE;
INSERT INTO TBL_Error
( Time_Stamp )
SELECT CURRENT_TIMESTAMP;
SET Ret_cd = 1;
IF Ret_Cd = 0 THEN
UPDATE TBL_ERROR
SET TIME_STAMP = CURRENT_TIMESTAMP;
END ;
↧