Subject | Re: Newlines etc. in string literals |
---|---|
Author | malte_starostik |
Post date | 2003-08-07T13:10:52Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
issue for me luckily).
Although I needed to use 'blah'||substr(aschii_char(13),1,1)||substr
(ascii_char(10),1,1)||'blah' or it would truncate anything after the
first ascii_char(). Is this a known issue?
Actually I've used this approach before when inserting graphics into
BLOB fields via a generated script that reads the graphics from
files. For that I wrote a UDF that takes a base64 encoded string and
returns a BLOB. Any interest in including base64 codec UDFs into
fb_udf? I've got the decoding part working already.
Regards,
-Malte
wrote:
> At 12:09 PM 7/08/2003 +0000, you wrote:containing
> >Hi,
> >
> >I've been trying in vain to find a way to insert a string
> >newlines into a varchar field with a plain SQL script (it's[...]
> >generated, can't use parameters here).
> Have you tried concatenating it into your string literal using theUDF
> ascii_char??Thank you so much, this worked like a charm (\r\n vs. \n isn't an
>
> update atable
> set funnychars = 'blah'||ascii_char(13)||ascii_char(10)||'blah'
> where....;
issue for me luckily).
Although I needed to use 'blah'||substr(aschii_char(13),1,1)||substr
(ascii_char(10),1,1)||'blah' or it would truncate anything after the
first ascii_char(). Is this a known issue?
Actually I've used this approach before when inserting graphics into
BLOB fields via a generated script that reads the graphics from
files. For that I wrote a UDF that takes a base64 encoded string and
returns a BLOB. Any interest in including base64 codec UDFs into
fb_udf? I've got the decoding part working already.
Regards,
-Malte