Friday, 3 April 2020

How to remove special characters in a string using Oracle Sql Query



How to remove special characters in a string using Oracle Sql Query?

SELECT     REGEXP_REPLACE('Th♥is∞ is a dem☻o of REGEXP_♫REPLACE function','[^a-z_A-Z ]') FROM     dual;

The following is the output result.

This is a demo of REGEXP_REPLACE function.
This query is useful mainly for data cleaning purpose.


How to remove redundant spaces in a string using Oracle SQL Query?



SELECT
  regexp_replace(
  'This line    contains    more      than one   spacing      between      words'
  , '( ){2,}', ' ' ) regexp_replace
FROM
  dual;

Output:

This line contains more than one spacing between words

No comments:

Post a Comment

In how many ways we can link the requisition to purchase order in oracle ebs

 In Oracle E-Business Suite (EBS) R12 / R12.2, a Purchase Requisition can be joined to a Purchase Order across 4 primary levels , depending ...