Subject | Re: [firebird-support] An alternative for ASCII_CHAR() ? |
---|---|
Author | Mark Rotteveel |
Post date | 2015-06-04T09:58:06Z |
On 04 Jun 2015 00:10:14 -0700, "brucedickinson@... [firebird-support]"
<firebird-support@yahoogroups.com> wrote:
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-hexbinstrings.html
Mark
<firebird-support@yahoogroups.com> wrote:
> Hello,- a
>
> I need to produce delimited text output from my stored procedure, for
> example:
>
> 23;65;some text;
>
> The thing is that semicolon ";" might appear in one of the delimited
> fields and this will cause some bugs on the client side. So I want to
> change this character to a less common one. I've decided to use ASCII 7
> "Bell" character.You might be able to use binary string literals:
>
> I am afraid that usage like this:
>
> DECLARE V_OUTPUT VARCHAR(1024);
> DECLARE V_PARAM VARCHAR(32);
> ...
>
> V_OUTPUT = V_OUTPUT || ASCII_CHAR(7) || V_PARAM;
>
> will slow down my query because I will be doing a lot of concatenations.
> Correct me if I am wrong but I think that even if I put this code into
> stored procedure, ASCII_CHAR(7) will not be resolved at compile time and
> will be called over and over again?
>
> Is there other way to put my character directly into the query? For
> semicolon that was easy:
>
> V_OUTPUT = V_OUTPUT || ';' || V_PARAM;
>
> but how to do this with a Bell character?
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-hexbinstrings.html
Mark