Guys i want the following oracle sql query to print the following value. I want to remove single quote from the column value. Let me know how to do that
select MSGID from schemaname_interface_daily_20110427 ;
Input:
X'414d51204545415837313150202020204d54a9e423d31a16'
Output:
X414d51204545415837313150202020204d54a9e423d31a16
REPLACE(item_description, '"', '') will absolutely remove any " from the column.
The simplest method to escape single quotes in SQL is to use two single quotes. For example, if you wanted to show the value O'Reilly, you would use two quotes in the middle instead of one. The single quote is the escape character in Oracle, SQL Server, MySQL, and PostgreSQL.
To include a single-quote in a string literal, use two of them in a row: update query_tab set title = 'It''s common knowledge' where id = '1121'; The method above works in any version of Oracle.
select replace (MSGID, '''', '') from schemaname_interface_daily_20110427;
Complete REPLACE
function's documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With