Archives of the TeradataForum
Message Posted: Wed, 18 Sep 2002 @ 23:28:01 GMT
<-- Anonymously Posted: Wednesday, September 18, 2002 17:01 -->
Can a CASE statement be in a macro?
Since upgrading to V2R4.1.3 this past weekend, the macro does not delete the row if CKT_SUBD_NO is NULL, so I'm trying to figure out the least painful way to do the delete, without having to change application code.
Did NCR tighten up some code around nulls, because this macro deletes the row on our V2R3 system.
REPLACE MACRO a_tb0003a ( ni_cktid (INT), ckt_subd_no (INT), ckt_date (CHAR(8)), ckt_time (INT) ) AS ( (CASE WHEN CKT_SUBD_NO IS NULL THEN DELETE TGOPWKLSTV1 WHERE NI_CKTID = :ni_cktid AND CKT_SUBD_NO IS NULL AND CKT_DATE = :ckt_date AND CKT_TIME = :ckt_time ELSE DELETE TGOPWKLSTV1 WHERE NI_CKTID = :ni_cktid AND CKT_SUBD_NO = :ckt_subd_no AND CKT_DATE = :ckt_date AND CKT_TIME = :ckt_time END) ; ); WHEN CKT_SUBD_NO IS NULL $ *** Failure 3706 Syntax error: expected something between '(' and the 'CASE' keyword.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|