It prints: The syntax of the string representation of a datetime value is incorrect
without a reason, when I try to call a stored proc with DATE
parameters from another stored proc.
Strange thing, presence or absence of unused variables affects the result.
this fails:
--<ScriptOptions statementTerminator="^"/>
CREATE PROCEDURE MYTESTDATE2 ()
DYNAMIC RESULT SETS 1
P1: BEGIN ATOMIC
DECLARE @FOO INTEGER;
CALL MYTESTDATE1 (
'2014-07-30' -- IN @DATE_OF_INSERT TIMESTAMP,
);
END P1
^
This succeeds:
CREATE PROCEDURE MYTESTDATE2 ()
DYNAMIC RESULT SETS 1
P1: BEGIN ATOMIC
DECLARE @FOO INTEGER;
SET @FOO = NULL;
CALL MYTESTDATE1 (
'2014-07-30' -- IN @DATE_OF_INSERT TIMESTAMP,
);
END P1
This succeeds too:
CREATE PROCEDURE MYTESTDATE2 ()
DYNAMIC RESULT SETS 1
P1: BEGIN ATOMIC
CALL MYTESTDATE1 (
'2014-07-30' -- IN @DATE_OF_INSERT TIMESTAMP,
);
END P1