Subject RE: [firebird-support] Any UDF or Built in Finction to handle "escaping" single quotes in strings
Author Sasha Matijasic
>
> Is anyone aware of a simple way of escaping imbedded single quotes in
> strings within a PSQL procedure / trigger (short of writing a UDF)? I
> need to receive a string parameter which then will be processed via
> an "execute statement" and "execute block" combination and so any
> imbedded single quotes need to be duplicated.
>
> (version is Firebird 2.1)
>
> I haven't been able to find anything obvious though it's not the
> easiest thing to search for.
>

I'm not sure you need it, but if all you want is to duplicate single quotes use replace.

select replace('foo''s', '''', '''''') from rdb$database

Sasha