|Subject||Re: [firebird-support] Re: CAST doesn't work in SELECT|
Thanx for the advice, i ll try to use substring.
On 8/3/06, Adam <s3057043@...> wrote:
> --- In email@example.com<firebird-support%40yahoogroups.com>,
> "Fabio Gomes" <fabioxgn@...>
> > The field is Varchar(30) because other configs uses strings,
> numbers and
> > other stuff.. and some just uses "Y" and "N", i made the table this
> > cause i thought it would be the best way to store all configs in
> the same
> > place, if i were to make one table for each kind of config, bool,
> > numeric, etc, i think it would be more messed up than having
> everything 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.
[Non-text portions of this message have been removed]