The code generated by Quest Code Tester For Oracle is wrong for TIMESTAMP data types.
The description for the result (QU_RESULT.DESCRIPTION) is incorrect for TIMESTAMP data types.
For DATE data types the following is generated (correct):
FUNCTION fp_to_string (value_in IN DATE)
RETURN VARCHAR2
IS
l_string VARCHAR2 (32767);
BEGIN
l_string :=
CASE
WHEN value_in IS NULL THEN 'NULL'
ELSE TO_CHAR (value_in, 'YYYY-MM-DD HH24:MI:SS')
END;
RETURN l_string;
END fp_to_string;
For TIMESTAMP however, the following is generated, which is incorrect:
FUNCTION fp_to_string (value_in IN TIMESTAMP)
RETURN VARCHAR2
IS
l_string VARCHAR2 (32767);
BEGIN
l_string :=
CASE
WHEN value_in IS NULL THEN 'NULL'
ELSE TO_CHAR (value_in)
END;
RETURN l_string;
END fp_to_string;
No specif format mask is used in the call to TO_CHAR.
The same holds for EXP_TO_STRING.
Note: To reproduce the error create a simple test with one function that returns a date, and another test that returns a timestamp. Then generate the code with Quest Code Tester for Oracle
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center