Subject | Re: CAST doesn't work in SELECT |
---|---|
Author | Adam |
Post date | 2006-08-04T01:41:53Z |
--- In firebird-support@yahoogroups.com, "Fabio Gomes" <fabioxgn@...>
wrote:
the field, through an admin tool or possibly one day through a bug in
your program, and while the cast as varchar(1) would work providing
no field contained such an illegal value, a safer approach may be to
use a substring function.
We do something similar so I understand your problem.
Adam
wrote:
>numbers and
> The field is Varchar(30) because other configs uses strings,
> other stuff.. and some just uses "Y" and "N", i made the table thisway
> cause i thought it would be the best way to store all configs inthe same
> place, if i were to make one table for each kind of config, bool,string,
> numeric, etc, i think it would be more messed up than havingeverything in
> just one table.. or would more tables be better than just one?assuming that
> i will have something like 200+ rows in this config table.All I am warning is that it is possible for someone to store 'YES' in
the field, through an admin tool or possibly one day through a bug in
your program, and while the cast as varchar(1) would work providing
no field contained such an illegal value, a safer approach may be to
use a substring function.
We do something similar so I understand your problem.
Adam