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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

using single quote in pl/sql

271944Apr 26 2005 — edited Apr 27 2005
I have a procedure that needs to execute a dynamic query.
here is my brief code.

sql_stmt := 'select * from test where default = '|| gc_default || ';

this is just a part of my code. but the problem is that default column is varchar, so the "gc_default" variable should be wrapped with single quote. it should be like this. select * from career where job = 'DEFAULT';

does anybody know?

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2005
Added on Apr 26 2005
11 comments
1,030 views