Subject | Re: [firebird-support] Any UDF or Built in Finction to handle "escaping" single quotes in strings |
---|---|
Author | Helen Borrie |
Post date | 2008-08-25T09:42:57Z |
At 18:35 25/08/2008, you wrote:
Escaping apostrophes embedded in strings is a standard SQL thing. If you're using Delphi, apply the QuotedStr() function to the string as you assign it to the parameter and it will take care of doubling the apostrophes. If you're using some other client interface, look for a function with similar effects.
./heLen
>Is anyone aware of a simple way of escaping imbedded single quotes inExecute Block doesn't belong in a procedure or trigger.
>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)And you won't find such a thing. Input parameters for stored procedures, like substitutable params for other statements, have to *arrive* at the server with apostrophes pre-processed. It's not a UDF or any server-side function you want, it's a function on the client side. Think about it. ;-)
>
>I haven't been able to find anything obvious though it's not the
>easiest thing to search for.
Escaping apostrophes embedded in strings is a standard SQL thing. If you're using Delphi, apply the QuotedStr() function to the string as you assign it to the parameter and it will take care of doubling the apostrophes. If you're using some other client interface, look for a function with similar effects.
./heLen