Subject RE: [firebird-support] Domains in computed columns
Author Rick Debay
> AFAIK you cant specify a type for a computed field.

If that's correct, then the question becomes "why can I specify a type
as in the first example?"

-----Original Message-----
[] On Behalf Of Alexandre Benson
Sent: Wednesday, March 04, 2009 5:06 PM
Subject: Re: [firebird-support] Domains in computed columns

Rick Debay wrote:
> If I define a computed column with an explicit data type, it works:
> FIELD_NAME DECIMAL(5,2) COMPUTED BY (...some formula...)
> If I use a domain name, I get an error message:
> ISC ERROR CODE:335544569
> Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 21, char 24
> Is this the expected behavior?

AFAIK you cant specify a type for a computed field.

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
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil

Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.