|
Archives of the TeradataForumMessage Posted: Thu, 11 Dec 2008 @ 11:34:50 GMT
The irony of all this discussion over Exception handling is that the original Oracle Function didn't actually need the Exception handling code: if to_number(substr(v_StrTime,1,2))<5 then select to_char(p_Date-1,'D') into v_Day from dual; else select to_char(p_Date,'D') into v_Day from dual; end if; RETURN to_number(v_Day); exception when no_data_found then null; RETURN -1; As far as I can tell, you'll always get a row back, thereby negating the need for that block In terms of Teradata, use a CASE statement - simple as that. Oh, how I love discussions over Stored Procedures ! Regards David Clough
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||