I have to load data through sql loader in oracle database. In control file
FIELDS TERMINATED BY ¶
mention. sql loader unable to recognize pilcrow as a delimiter.
data like
HDR¶name¶Id
BDY¶rohan¶2
TRL¶1
I have to load data through sql loader in oracle database. In control file
FIELDS TERMINATED BY ¶
mention. sql loader unable to recognize pilcrow as a delimiter.
data like
HDR¶name¶Id
BDY¶rohan¶2
TRL¶1
The example given by S_Sauden works for me as well..
Initially start by trying with a Hex Value in the ctl file:
Fields terminated by X'C2B6'
You can use below query to find hex_value for reference:
select rawtohex( utl_raw.cast_to_raw( '¶' ) ) from dual;
If the above idea doesn't work for you then you can check the encoding of the file which you are trying to upload:
file -i datafile
Above command works for linux
to get the charset [encoding]. You can use that information below in ctl
file for sqlldr
:
load data
CHARACTERSET UTF8
infile
Its important to sync the characterset of DB, File, Loader to make sure you don't lose any data in translation.
Below query gives you information about your Oracle DB environment:
SELECT * FROM V$NLS_PARAMETERS
Also you should make sure that your OS environment has correct NLS_LANG environment variable set. If nothing is set then please do the needful. You can use the reference link below for a full guide on the same.
export NLS_LANG=[NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]
For example: American_America.UTF8
Reference Link
Please check link for some understanding & reference on importance of characterset.
Try this: It may help you.
Demo: First, i have created one table
I have created one control file test.ctl
Run from command prompt:
It works for me.