Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Syntax of Q-Quote operator

VitaminDNov 23 2009 — edited Nov 23 2009
DB Version:11g
I had a similair post on this on friday.
992333
 create table emp_dtl
 (empid number,
 empdesc varchar2(500)
 );

Table created.

insert into emp_dtl values (99,'Quick learner');
When i try to do the following update, i get the following error.
update emp_dtl set empdesc = 'This employe has got  'Tremondous' and 'Admirable' potential'
 where empid=99
/
update emp_dtl set empdesc = 'This employe has got  'Tremondous' and 'Admirable' potential'
                                                      *
ERROR at line 1:
ORA-00933: SQL command not properly ended
Hoek and Massimo gave me the fix for this(just add a single quote for quote within the string)
update emp_dtl 
set empdesc = 'This employe has got  ''Tremondous'' and ''Admirable'' potential'
where empid=99;

1 row updated.
I thought of using q-quote for fixing this. But i am getting
ERROR at line 2:
ORA-00933: SQL command not properly ended
for my below attempts
update emp_dtl 
set empdesc = 'This employe has got  q'['Tremondous' and 'Admirable']' potential'
where empid=99;


update emp_dtl 
set empdesc = 'This employe has got  q'('Tremondous' and 'Admirable')' potential'
where empid=99
Am i not using the right syntax for Q-quote?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2009
Added on Nov 23 2009
6 comments
1,967 views