PL/SQL (MOSC)

MOSC Banner

Using quote delimiter in triggers

edited Jan 24, 2013 3:11AM in PL/SQL (MOSC) 9 commentsAnswered
Hi,I'd like to use quote delimiter function in trigger,i.e. like
...
CASE WHEN inserting THEN
  sql_str := ' insert into tablename(NAME) values ('|| :NEW.NAME||');'
..
but as taht :NEW varialbe might contain some special characters, it would be useful to use q'[ xxx ]' function introduced in 10g.
So next step is to modify trigger to be like
...
...
CASE WHEN inserting THEN
  sql_str := ' insert into tablename(NAME) values ('|| q'[:NEW.NAME]'||');'

--> but now I'm capturing string :NEW.NAME isntead of the value in :NEW..NAME
...
I'm confused, is somebody brighter than me... please give a hand,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center