Thanks! We'll email you
when relevant content is
added and updated.
I wrote a function to change a date in character *USA format to *ISO character format. There is a lot of data to insert and all the dates are in *USA format rather than ISO format. The function is created but running the statement, I am told the function does not exist. Why isn't the function found? (Question 1) Here's the code.
DROP FUNCTION TIMR.U2O;
CREATE FUNCTION TIMR.U2O(INUSA CHAR(10) )
RETURNS CHAR(10 )
DECLARE OUTISO CHAR(10);
SET OUTISO = CONCAT(SUBSTR(INUSA, 7,4), '-') ;
SET OUTISO = CONCAT(OUTISO, SUBSTR(INUSA, 1,5)) ;
RETURN OUTISO ;
SELECT TIMR.U2O('12-31-1931') AS BDATE FROM TIMR.DISMSTP;
I looked for an existing function that would do this but could find none. Is there a shorter way? (Question 2)
May 4, 2006 8:52 PM
May 5, 2006 12:27 PM