Subject | Re: [ib-support] Computed by Type |
---|---|
Author | Claudio Valderrama C. |
Post date | 2001-09-29T04:52:54Z |
""Ivan Prenosil"" <prenosil@...> wrote in message
news:20010926151308.2232F1506D@......
the second version is script-safe. I mean, if you use the first way and
extract you database metadata with isql, since it skips the data type of
computed fields, the forced type is lost if the extracted script is used to
recreate the db. The second version should preserve the forced type even in
scripts.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:20010926151308.2232F1506D@......
> > How do I specify "type" and "computed by" for the same field?I can't see the original question from the NG, but I have to say that only
>
> This works
> <col_name> <type> COMPUTED BY (<expression>)
> but it only accepts basic types (INTEGER, VARCHAR, ...), not domains.
>
> Cast also works
> <col_name> COMPUTED BY (CAST (<expression> AS <type>))
> but it also does not accept domains.
the second version is script-safe. I mean, if you use the first way and
extract you database metadata with isql, since it skips the data type of
computed fields, the forced type is lost if the extracted script is used to
recreate the db. The second version should preserve the forced type even in
scripts.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing