Subject | Re: Field type for Binary Short Strings? |
---|---|
Author | semprelliure |
Post date | 2003-08-07T09:18:01Z |
Thanks, Olivier, but how must I assign the value?
If I make
UPDATE MY_TABLE
SET MY_COMMAND=ASCII_CHAR(65)||ASCII_CHAR(0)||ASCII_CHAR(66);
then I only see MY_COMMAND='AB'
or ASCII_VAL(SUBSTR(MY_COMMAND,1,1))=65
ASCII_VAL(SUBSTR(MY_COMMAND,2,2))=66
ASCII_VAL(SUBSTR(MY_COMMAND,3,3))=32
ASCII_VAL(SUBSTR(MY_COMMAND,4,4))=32
...
The 0 byte is missing again. Maybe ASCII_CHAR is not the right way?
Hugo.
--- In firebird-support@yahoogroups.com, Olivier Mascia <om@t...>
wrote:
If I make
UPDATE MY_TABLE
SET MY_COMMAND=ASCII_CHAR(65)||ASCII_CHAR(0)||ASCII_CHAR(66);
then I only see MY_COMMAND='AB'
or ASCII_VAL(SUBSTR(MY_COMMAND,1,1))=65
ASCII_VAL(SUBSTR(MY_COMMAND,2,2))=66
ASCII_VAL(SUBSTR(MY_COMMAND,3,3))=32
ASCII_VAL(SUBSTR(MY_COMMAND,4,4))=32
...
The 0 byte is missing again. Maybe ASCII_CHAR is not the right way?
Hugo.
--- In firebird-support@yahoogroups.com, Olivier Mascia <om@t...>
wrote:
> Hello Hugo,OCTETS
>
> CHAR(x) or maybe better VARCHAR(x) but both with CHARACTER SET
>
> --
> Best regards,
> Olivier Mascia