Subject | Re: [firebird-support] octets handling |
---|---|
Author | Ivan Prenosil |
Post date | 2006-10-06T17:02:13Z |
>I need to construct a string, within an SP and preserve all values,You can't use ascii_char for this because it's return parameter is defined as CSTRING.
> including nulls.
>
> declare variable payload Char(29) character set OCTETS;
> declare variable i1 Integer;
> declare variable i2 Integer;
> declare variable i3 Integer;
> declare variable i4 Integer;
>
> i1 = 6;
> i2 = 0;
> i3 = 60;
> i4 = 1;
>
> payload = ascii_char(i1) || ascii_char(i2) || ascii_char(i3) || ascii_char(i4);
>
> results in payload = '063C00000...'
>
> whereas I would expect & need '06003C01000...'
You shold write your own UDF.
Ivan