Hi,
I am extracting data from an Oracle table. The file generated is in ANSI (came to konw form Notepad++ Encoding option). When I open the file in notepad, I see "STUDENT FEES" (space between 2 words) but when I change the Encoding to UTF-8 space is replaced by "xA0".
The target system accepts only UTF-8. So when the record is loaded to target system it appears as "STUDENT?FEES". I tried changing the file type to UTF-8 but still no good. Special character is still loading to target system.
Below is my SQL:
DEFINE OTBDIR = &1\
DEFINE Filename= CC
DEFINE FileExt= '.txt'
SET LINESIZE 32767
SET TRIMOUT ON
SET ECHO OFF
SET FEEDBACK OFF
SET TRIMSPOOL ON
SET VERIFY OFF
SET PAGESIZE 0
SET TERMOUT OFF
SET TERM OFF
set feed off
set colsep |
SET HEADING OFF
column dt new_val file_pref
SELECT '&Filename&FileExt' AS DT FROM DUAL;
SPOOL &OTBDIR&file_pref
SELECT "CC"||'|'||"Parent"||'|'||"Alias"||'|'||"Data Storage"||'|'||"PlanType1"||'|'||"Aggregation1"||'|'||"PlanType2"||'|'||"Aggregation2"||'|'||"PlanType3"||'|'||"Aggregation3 "||'|'||"PlanType4"||'|'||"Aggregation4"||'|'||"UDA" FROM ABC.CC_View
/
SPOOL OFF
exit
Could you please tell me how to replace xA0 with space in output file? Thanks.
Sid
[Updated on: Thu, 18 February 2021 20:52]
Report message to a moderator