Subject Re: CAST, CONVERT etc...
Author Adam
--- In firebird-support@yahoogroups.com, "d_dude_2003"
<d_dude_2003@y...> wrote:
> Hi there guys,
>
> I need to convert INTEGER to the string, so how should i use
> CAST function or CONVERT...Lets say i call CAST(MyValue AS VARCHAR
> (3))..What it will return for MyValue = 10?
>

It will not pad anything, it is exactly the same as storing '10' in a
varchar field.

Run this and see:

select '>' || cast(10 as varchar(3)) || '<' from rdb$database;

You will get a conversion error if the integer cast as a varchar
takes up more characters than the size of the varchar field.

Adam