SPL syntax question
Posted in 1999
Topics: Stored Procedures & SPL, Platform-Specific Issues, Versions, Editions & End-of-Life
if 'return _d' is just a misprint (sohuld be 'return _d1')
the trouble is that DATETIME conflict with the DATE type, so just write:
CREATE PROCEDURE _testdate (
_d1 DATE DEFAULT "1999-03-25"
) RETURNING DATE;
RETURN _d1;
END PROCEDURE;
best regards
claus samuelsen
Leonid Belov wrote:
> Hello all,
>
> I've tried to create stored procedure with DATE parameter.
> Who can say what's wrong here:
>
> CREATE PROCEDURE _testdate (
> _d1 DATE DEFAULT DATETIME(1999-03-25)
> ) RETURNING DATE;>
> RETURN _d;
>
> END PROCEDURE;
>
> I've had error -201 on IDS 7.30.UC2 Solaris i86
>
> Any help would be appreciated
>
> Leonid
Hello all,
I've tried to create stored procedure with DATE parameter.
Who can say what's wrong here:
CREATE PROCEDURE _testdate (
_d1 DATE DEFAULT DATETIME(1999-03-25)
) RETURNING DATE;
RETURN _d;
END PROCEDURE;
I've had error -201 on IDS 7.30.UC2 Solaris i86
Any help would be appreciated
Leonid
Yes, I've tried such a way but it's locale-specific.
I need a way to write default value that will be independent
of current locale and, respectively, literal date format.
The best way is to use something like
DEFAULT MDY(3,25,1999)
but the server refuses it.
Claus Samuelsen wrote:
> if 'return _d' is just a misprint (sohuld be 'return _d1')
Yes, of course
>
> the trouble is that DATETIME conflict with the DATE type, so just write:
>
> CREATE PROCEDURE _testdate (
> _d1 DATE DEFAULT "1999-03-25"
> ) RETURNING DATE;>
> RETURN _d1;
>
> END PROCEDURE;
>
> >
> > I've tried to create stored procedure with DATE parameter.
> > Who can say what's wrong here:
> >
> > CREATE PROCEDURE _testdate (
> > _d1 DATE DEFAULT DATETIME(1999-03-25)
> > ) RETURNING DATE;> >
> > RETURN _d;
> >
> > END PROCEDURE;
> >
> > I've had error -201 on IDS 7.30.UC2 Solaris i86
Leonid