Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Single Quote from the column value in oracle sql

Tags:

sql

oracle

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 
like image 359
Dead Programmer Avatar asked Apr 27 '11 06:04

Dead Programmer


People also ask

How do I remove a column quote in SQL?

REPLACE(item_description, '"', '') will absolutely remove any " from the column.

How do you remove single quotes in SQL?

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.

How do I change the value of a single quote column in Oracle?

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.


1 Answers

select replace (MSGID, '''', '') from schemaname_interface_daily_20110427;

Complete REPLACE function's documentation.

like image 89
HAL 9000 Avatar answered Oct 01 '22 10:10

HAL 9000