Subject | Re: Fb 2.1 and Domains in Procedure Parameters |
---|---|
Author | emb_blaster |
Post date | 2008-11-14T17:36:37Z |
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@...> wrote:
it must also get default values. in this case D2 must have a default
value or become before others parms.
can do instead,
MON2 Numeric(18,4)) AS
begin
MON2 = 2;
<m.tonies@...> wrote:
>If you give a parameter a default value, all parameters coming after
> Hey,
>
> I'm trying to use Domains in Procedure Parameters like this:
>
> ALTER PROCEDURE DOMAIN_TEST (
> D D_BETWEEN4AND10 default 4,
> D2 SmallInt,
> DE D_EMAIL DEFAULT 'test')
> returns (
> MON D_MONEY,
> MON2 Numeric(18,4)) AS
> begin
> exit;
> end
>
> But I get a message:
> Dynamic SQL Error SQL error code = -204 can not define a not null column
> with NULL as default value invalid clause --- 'defaults must be last'
>
it must also get default values. in this case D2 must have a default
value or become before others parms.
> If I remove "default 4", it works fine. The domain has no defaultdefined.
>I think that output params cannot have a default param this way. you
> If I try this:
>
> MON2 Numeric(18,4) default 2) AS
>
> Then I get:
> Dynamic SQL Error SQL error code = -104 Token unknown - line 7, char 22
> default
can do instead,
MON2 Numeric(18,4)) AS
begin
MON2 = 2;