Teradata can check a condition based on both ID and Date in a case by using the following syntax:
CASE WHEN ID = '123' AND Date = '2021-01-01' THEN 'Condition Met' ELSE 'Condition Not Met' END
In this example, the CASE statement is checking if the ID is equal to '123' and the Date is equal to '2021-01-01'. If the condition is true, the statement will return 'Condition Met', otherwise it will return 'Condition Not Met'.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-05-04 11:00:00 +0000
Seen: 7 times
Last updated: May 10 '21