Subject | Re: [firebird-support] Domains in computed columns |
---|---|
Author | Alexandre Benson Smith |
Post date | 2009-03-04T22:06:18Z |
Rick Debay wrote:
But you can cast it to the desired type.
FIELD_NAME COMPUTED BY (cast(...some formula... as DECIMAL(5,2)))
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> If I define a computed column with an explicit data type, it works:AFAIK you cant specify a type for a computed field.
>
> FIELD_NAME DECIMAL(5,2) COMPUTED BY (...some formula...)
>
> If I use a domain name, I get an error message:
>
> ISC ERROR CODE:335544569
> ISC ERROR MESSAGE:
> Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 21, char 24
> COMPUTED
>
> FIELD_NAME DOMAIN_NAME COMPUTED BY (...some formula...)
>
>
> Is this the expected behavior?
>
But you can cast it to the desired type.
FIELD_NAME COMPUTED BY (cast(...some formula... as DECIMAL(5,2)))
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br