Search This Blog

Friday, July 29, 2022

Remove new line characters in a VARCHAR2 in Oracle PL/SQL

-- Way 1
SELECT 
TRANSLATE('234
456
678', CHR(10) || CHR(13), '$') FROM DUAL;

-- Way 2
SELECT REPLACE(REPLACE('234
456
678', CHR(10), '$'), CHR(13), '%') FROM DUAL;

No comments:

Post a Comment

Read file content from an Oracle Directory in PL/SQL/ in IFS

Read single file DECLARE file_handle_ UTL_FILE.FILE_TYPE; directory_name_ CONSTANT all_directories.directory_name%TYPE := '...

Popular Posts