Subject Re: CAST doesn't work in SELECT
Author Adam
> Sorry for hijacking the topic but, i need to select a varchar(30) as
> char(1), should i use cast?
> The reason is that i have a config table that have 2 fields (config and
> value) and some configs will be always "Y" or "N", so can i use cast
in this
> case?

Why would it always be 'Y' or 'N' and be defined as varchar(30)? Cast
as varchar(1) will raise an exception if more than 1 character is found.

I would use the substr UDF call in ib_udf.dll, or I think a substring
command is introduced in the engine in FB 2.