Subject | Re: [firebird-support] How to handle ' in execute statement |
---|---|
Author | Martijn Tonies |
Post date | 2007-05-11T08:31:28Z |
Hi,
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
> Sveins suggestion of 4 pairs of single quotes actually worked :-))Yes, it does make sense.
>
> So 'Select surname from patient where surname containing '''''''' '
> Returns O'Rielly - looks amazing but has some logic to it.
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