Subject Re: [firebird-support] How to handle ' in execute statement
Author Martijn Tonies
Hi,

> Sveins suggestion of 4 pairs of single quotes actually worked :-))
>
> So 'Select surname from patient where surname containing '''''''' '
> Returns O'Rielly - looks amazing but has some logic to it.

Yes, it does make sense.

In order to save this procedure, you will need to double the
single quotes, cause you're sending the CREATE PROCEDURE
to the server.

Next, you need to double the quotes in the quoted string. But
because you already double the quotes, this single quote in the
resulting EXECUTE STATEMENT becomes 4 quotes. So in
total, this makes 4 pairs of single quotes :-)

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com