on 09-20-2014 11:44 AM
Hi All,
We are using Dynamic Queries in our Stored procedure and sometimes we need to use string literals (e.g. 'abc' or "YEAR_MONTH"||'01') in the query. Can anyone share the escape character which we need to use for single quote(') or for concatenation symbol (||)? I know I can first initialize a variable and use that variable in the query, but it will be nice to know, what should be the escape character if I need to hard code these literals in the query.
Regards,
Piyush
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pls try below in place of quote
'''||'
For "YEAR_MONTH"||'01', EXECUTE IMMEDIATE 'SELECT "YEAR_MONTH"||'''||'01'''||' FROM <<table_name>>' ;
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.