Archives of the TeradataForum
Message Posted: Thu, 19 Sep 2002 @ 00:15:12 GMT
I am curious how this ever worked? I have never seen a macro that starts with a case statement.
The SQL Reference manual says the syntax of a replace macro is:
Replace macro (Parameters)
The manual further goes on to say that "statement" is an SQL statement.
Your macro starts with a CASE statement which is not an SQL Statement. Case can be used as part of a statement but not a statement in its own right.
This seems to be confirmed by the error message you are getting. When it says "something expected between (and case" I think what is expected is a DML statement such as "DELETE" or "SELECT" etc.
Perhaps you could rewrite your delete like this:
DELETE TGOPWKLSTV1 WHERE NI_CKTID = :ni_cktid AND ((CKT_SUBD_NO IS NULL and :ckt_subd_no is null) OR (CKT_SUBD_NO = :ckt_subd_no)) AND CKT_DATE = :ckt_date AND CKT_TIME = :ckt_time ;
Hope this helps
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|