Quoth the Raven

February 7, 2011 at 12:20 pm | Posted in Oracle Developement | Leave a comment

There is a handy little function that was introduced in 10g. It helps with the pain of escaping single ticks in string literals:

SQL> select q'(quoth the raven 'Nevermore')' from dual;
Q'(QUOTHTHERAVEN'NEVERMORE'
---------------------------
quoth the raven 'Nevermore'

This comes in handy when doing dynamic SQL where you want to execute complicated queries in an execute immediate call.

For further documentation see the Oracle documentation.

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Entries and comments feeds.

%d bloggers like this: