Korean Characters and External Table
Hi Experts.
We have data exported from teradata through fexp utility.
The file that we export has Korean character in it. When we are trying to load the file
to Oracle Db (10.2) through external tables. But We are not able do a select query itself from the external table.
Is any characterset setting we have to make for external table.
Above scripts are executed from DBs erver itself through Unix.
What is the character set and national character set of the Oracle database?
What character set is the data file encoded in?
What character set is specified in the external table definition?
What does "not able to do a select query" mean? Does that mean that you get an error? If so, what error?
Justin
Similar Messages
-
SQL *Loader and External Table
Hi,
Can anyone tell me the difference between SQL* Loader and External table?
What are the conditions under we can use SQL * Loader and External Table.
ThanxExternal tables are accessible from SQL, which generally simplifies life if the data files are physically located on the database server since you don't have to coordinate a call to an external SQL*Loader script with other PL/SQL processing. Under the covers, external tables are normally just invoking SQL*Loader.
SQL*Loader is more appropriate if the data files are on a different server or if it is easier to call an executable rather than calling PL/SQL (i.e. if you have a batch file that runs on a server other than the database server that wants to FTP a data file from a FTP server and then load the data into Oracle).
Justin -
My iphone 4s has korean characters and 1 icon that looks like IC at the back panel and KCC-CMM-APA-A1387. Compared to the other iphone 4s that have 6 icons printed. Serial number is recognized by apple systems though like App Store, Coverage Check etc. Should i be worried about the authenticity of this product? I got it at a Mall shop that sells apple products but I am not so comfortable about the difference of the icons at the back. I told them about my issue and they said if it were bootleg I wouldnt be able to register the product and the serial number which I was able to do. Help please.
Oops sorry. My bad. I'm in the Philippines. I'm quite concerned because i know a lot of bootlegged stuff go around the market here. Yes, they told me it was unlocked and not tied up with a local network carrier so I can use any network sim card with it. The icons on the phone and all functions are available and working well like all iphone 4Ss that i have tried. Its just the icons printed at the back panel of the phone that are different, the ones that look like FC X C E etc printed at the back of a common iphone. Mine has an icon that looks like IC only.
-
SQL and External table question
Hello averyone,
I have a file to be read as an external table part of it is below:
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((''),'2;1');
FILE_NAME('BRACKET','2005-07-08T',('broilo'),(''),
'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2004400',
'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2004400','');
FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'));
ENDSEC;
DATA;
#5=CARTESIAN_POINT('',(5.5E0,5.5E0,-5.1E1));
#6=DIRECTION('',(0.E0,0.E0,1.E0));
#7=DIRECTION('',(-1.E0,0.E0,0.E0));
#8=AXIS2_PLACEMENT_3D('',#5,#6,#7);
The first question is: how to ignore the lines until the DATA; line or SQL already does it for me?
The second question is: since the fields of interest are separated by commas and the first field does not interest me (it is solved with a varchar2) how can I read the following fields as numbers ignoring the (,# and ) characters please?
Thanks for any help.
Sincerely yours,
André LuizThe SKIP option can be used with SQL*Loader to skip a certain number of lines before starting to load. Off hand I cannot see any easy way to load the data in the format given. The format does not resemble a typical CVS format. You can look at the test cases provided for SQ*Loader in the Oracle® Database Utilities guide - or simply write PL/SQL code to load this data manually using UTL_FILE.
-
Error importing CSV files with 'hidden' characters using External Table
Hi Folks
Bit of a strange one here.
We're well used to using the External Table method of loading data from CSV files into the database but a recent event has presented us with a problem.
We have received some CSV files that 'look' like regular CSV files but Oracle will not load them.
When we examined the CSV file using VIM on a UNIX box we saw the following 'hidden' characters between every regular character in the file.
^@So a string that looks like this when opened in Excel/Wordpad etc
"TEST","TEXT"Looks like this when exmained with VIM
^@"^@T^@E^@S^@T^@"^@,^@"^@T^@E^@X^@T^@"Has anyone come across this before?
Many thanks
Simon Gadd
Oracle 11g 11.2.0.1.0Hi Simon,
^@ represents the NUL character (0x00).
So, most likely, you've got a Unicode-encoded file.
You'll have to specify the character set in the record specification (and if necessary the byte order mark), for instance :
CREATE TABLE ext_table
col1 VARCHAR2(10),
col2 VARCHAR2(10)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY dump_dir
ACCESS PARAMETERS
RECORDS DELIMITED BY '
' CHARACTERSET 'UTF16'
FIELDS TERMINATED BY ','
LOCATION ('dump.csv')
REJECT LIMIT UNLIMITED;http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/et_params.htm#i1009499 -
External Table and Direct path load
Hi,
I was just playing with Oracle sql loader and external table features. few things which i ovserved are that data loading through direct path method of sqlloader is much faster and takes much less hard disk space than what external table method takes. here are my stats which i found while data loading:
For Direct Path: -
# OF RECORDS.............TIME...................SOURCE FILE SIZE...................DATAFILE SIZE(.dbf)
478849..........................00:00:43.53...................108,638 KB...................142,088 KB
957697..........................00:01:08.81...................217,365 KB...................258,568 KB
1915393..........................00:02:54.43...................434,729 KB...................509,448 KB
For External Table: -
# OF RECORDS..........TIME...................SOURCE FILE SIZE...................DATAFILE SIZE(.dbf)
478849..........................00:02:51.03...................108,638 KB...................966,408 KB
957697..........................00:08:05.32...................217,365 KB...................1,930,248 KB
1915393..........................00:17:16.31...................434,729 KB...................3,860,488 KB
1915393..........................00:23:17.05...................434,729 KB...................3,927,048 KB
(With PARALLEL)
i used same files for testing and all other conditions are similar also. In my case datafile is autoextendable, hence, as par requirement its size is automatically increased and hard disk space is reduced thus.The issue is that, is this an expected behaviour? and why in case of external tables such a large hard disk space is used when compared to direct path method? Performance of external table load is also very bad when compared to direct path load.
one more thing is that while using external table load with PARALLEL option, ideally, it should take less time. But what i actually get is more than what the time was without PARALLEL option.
In both the cases i am loading data from the same file to the same table (once using direct path and once using external table). before every fresh loading i truncate my internal table into which data was loaded.
any views??
Deep
Message was edited by:
DeepThanx to all for your suggestions.
John, my scripts are as follows:
for external table:
CREATE TABLE LOG_TBL_LOAD
(COL1 CHAR(20), COL2 CHAR(2), COL3 CHAR(20), COL4 CHAR(400),
COL5 CHAR(20), COL6 CHAR(400), COL7 CHAR(20), COL8 CHAR(20),
COL9 CHAR(400), COL10 CHAR(400))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_TAB_DIR
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY WHITESPACE OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL
LOCATION ('LOGZ3.DAT')
REJECT LIMIT 10;
for loading i did:
INSERT INTO LOG_TBL (COL1, COL2, COL3, COL4,COL5, COL6,
COL7, COL8, COL9, COL10)
(SELECT COL1, COL2, COL3, COL4, COL5, COL6, COL7, COL8,
COL9, COL10 FROM LOG_TBL_load_1);
for direct path my control file is like this:
OPTIONS (
DIRECT = TRUE
LOAD DATA
INFILE 'F:\DATAFILES\LOGZ3.DAT' "str '\n'"
INTO TABLE LOG_TBL
APPEND
FIELDS TERMINATED BY WHITESPACE OPTIONALLY ENCLOSED BY '"'
(COL1 CHAR(20),
COL2 CHAR(2),
COL3 CHAR(20),
COL4 CHAR(400),
COL5 CHAR(20),
COL6 CHAR(400),
COL7 CHAR(20),
COL8 CHAR(20),
COL9 CHAR(400),
COL10 CHAR(400))
and ya, i have used same table in both the situations. after loading once i used to truncate my table, LOG_TBL. i used the same source file, LOGZ3.DAT.
my tablespace USERS is loaclly managed.
thanks -
Request: PL/SQL, External Table and SQL Loader
I see lately Questions asked in SQL and PL/SQL forum regarding SQL Loader and External Table are being moved to {forum:id=732}.
Being an PL/SQL developer for some time now i feel External Table (and if i may, SQL Loader and DBMS_DATAPUMP) are very much an integral part of a PL/SQL development and the question related to these topics are well suited in SQL and PL/SQL forum. Even in SQL and PL/SQL FAQ we have exclusive content that discuss on these topics {message:id=9360007}
So i would like to request the moderators to consider not moving such questions out of the SQL and PL/SQL forum.
Thanks,
Karthick.Karthick_Arp wrote:
I see lately Questions asked in SQL and PL/SQL forum regarding SQL Loader and External Table are being moved to {forum:id=732}.
Being an PL/SQL developer for some time now i feel External Table (and if i may, SQL Loader and DBMS_DATAPUMP) are very much an integral part of a PL/SQL development and the question related to these topics are well suited in SQL and PL/SQL forum. Even in SQL and PL/SQL FAQ we have exclusive content that discuss on these topics {message:id=9360007}
So i would like to request the moderators to consider not moving such questions out of the SQL and PL/SQL forum.
Thanks,
Karthick.Not sure which moderators are moving them... cos it ain't me. I'm quite happy to leave those there. -
Problem in storing korean Characters in Oracle 10g
Hi All,
Below are the current setup.
OS : Windows
Oracle Version : 10G
Database Character Set : AL32UTF8
NLS_LANG = KOREAN_KOREA.KO16MSWIN949 (in windows)
I can able to see Korean characters in MS Word & MS Excel. I copied some of the korean characters
and pasted in notepad and saved the file in UTF format. I tried to insert that data using sql loader.
After inserting the data, I could find only unknown characters with lots of ??? symbol. I have also
changed the data fonts to korean language in TOAD. But I can find only non-korean characters in
the table.
Please advise me, whether any other settings to be changed or provide step-by-step procedure to store
the korean data in database.
Regards,
RameshUnable to insert Korean Language in Oracle 10g
-
Carriage Return in External table column
Im using Oracle 9.2.0.6 . On Aix.
Ive created and external table pointing to a csv file.
When I do a select on the last column of the external_table, it contains a carriage return / linefeed. If I try to make the colums specification smaller then it throws and error
ORA-01401: inserted value too large for column
How can I eliminate this unwanted character.
line from csv file
2,,,,,,,,,,,,,,BB
table spec
create table x_needsprop
external_prop_ref varchar2(20),
floor_level varchar2(20),
dcc varchar2(4),
lc varchar2(4),
ptd varchar2(4),
wc varchar2(4),
ec varchar2(4),
rspr varchar2(4),
err varchar2(4),
ctb varchar2(4),
bd varchar2(4),
nda varchar2(4),
ndd varchar2(4),
vsam varchar2(4),
res_type varchar2(5)
ORGANIZATION EXTERNAL
( type oracle_loader
default directory external_dir
access parameters
( fields terminated by ',' )
location ('needsprop.csv')
/According to the documentation, adding the trim specifer 'RTRIM' directs that "spaces should be trimmed from the end of a text field. Spaces include blanks and other nonprinting characters such as tabs, line feeds, and carriage returns."
create table x_needsprop
external_prop_ref varchar2(20),
floor_level varchar2(20),
dcc varchar2(4),
lc varchar2(4),
ptd varchar2(4),
wc varchar2(4),
ec varchar2(4),
rspr varchar2(4),
err varchar2(4),
ctb varchar2(4),
bd varchar2(4),
nda varchar2(4),
ndd varchar2(4),
vsam varchar2(4),
res_type varchar2(5)
ORGANIZATION EXTERNAL
( type oracle_loader
default directory external_dir
access parameters
( fields terminated by ',' RTRIM)
location ('needsprop.csv')
) -
Error:loading from external table to database table
hi,
Following error comes while inserting data from external to new_ext table
what might be the reason??
error and external table creation script is as follows
regards,
Avinash
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-29400: data cartridge error
KUP-04020: found record longer than buffer size supported, 524288, in
/home/oracle/rgtr1.txt
ORA-06512: at " SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
ORA-06512: at "PRODNDBA.PROC_RGTR1", line 513
ORA-06512: at line 1
external table script is as follows:
DROP
TABLE EXT_TABLE_RGTR1 CASCADE CONSTRAINTS;
CREATE
TABLE EXT_TABLE_RGTR1
ID
VARCHAR2(10 BYTE),
PC
VARCHAR2(2 BYTE),
BU
VARCHAR2(4 BYTE),
CONSUMER_NO
VARCHAR2(12 BYTE),
CUR_READING1
NUMBER,
CUR_READING2
NUMBER,
ADJ_CONS1
NUMBER,
ADJ_CONS2
NUMBER,
TOT_EC
NUMBER,
TOT_FCA
NUMBER,
TOT_ED
NUMBER,
ADDLESS_AMT
NUMBER,
NETBILL_AMT
NUMBER,
ADJ_UNIT1
NUMBER,
ADJ_UNIT2
NUMBER,
TARIFF_CODE
NUMBER,
DUTY_CODE
NUMBER,
DISCONN_TAG
VARCHAR2(1 BYTE),
MIN_CHRG_IND
VARCHAR2(1 BYTE),
OC_CODE1
VARCHAR2(1 BYTE),
OC_CODE2
VARCHAR2(1 BYTE),
OC_AMT1
NUMBER,
OC_AMT2
NUMBER,
PREV_DPC
NUMBER,
CREDIT_AVG_BILL
NUMBER,
ADJ_TYPES
NUMBER,
ADJ_EC_FCA
NUMBER,
ADJ_ED
NUMBER,
ADJ_AMT1
NUMBER,
ADJ_AMT2
NUMBER,
ADJ_AMT3
NUMBER,
ADJ_AMT4
NUMBER,
ADJ_AMT5
NUMBER,
ADJ_AMT6
NUMBER,
ADJ_AMT7
NUMBER,
ADJ_AMT8
NUMBER,
MR_CYCLE
VARCHAR2(2 BYTE),
NOTICE
VARCHAR2(2 BYTE),
INSTAL_IND
VARCHAR2(1 BYTE),
LAST_RCPT_DT
VARCHAR2(6 BYTE),
MS1
NUMBER,
MS2
NUMBER,
ARR_PL_CR
NUMBER,
PREV_READ1
NUMBER,
PREV_READ2
NUMBER,
OLD_CONS_NUM
VARCHAR2(16 BYTE),
MTR_CODE1
VARCHAR2(2 BYTE),
MTR_CODE2
VARCHAR2(2 BYTE),
ABR_EC1
NUMBER,
ABR_FCA1
NUMBER,
REV_CAT
VARCHAR2(2 BYTE),
BILL_DT
DATE,
SD_PAID
NUMBER,
SD_ARRS
NUMBER,
SD_ADDL
NUMBER,
PR_RDNG_IND1
VARCHAR2(1 BYTE),
PR_RDNG_IND2
VARCHAR2(1 BYTE),
NAB_IND
VARCHAR2(1 BYTE),
CONN_LOAD
NUMBER,
OLDEST_OS_DT
VARCHAR2(4 BYTE),
ABR_RECAMT1
NUMBER,
METER_RENT
NUMBER,
EX_DUTY
NUMBER,
TDL_CHARGES
NUMBER,
ABR_MTH
VARCHAR2(4 BYTE),
READING_IND
VARCHAR2(1 BYTE),
FB_IND
VARCHAR2(1 BYTE),
ADJ_AMT
NUMBER,
MTR_NUM1
NUMBER,
MTR_NUM2
NUMBER,
AVG_UNITS1
NUMBER,
AVG_UNITS2
NUMBER,
MIN_BILL_AMT
NUMBER,
METER_COST_DEMANDED
NUMBER,
MF1
VARCHAR2(2 BYTE),
MF2
VARCHAR2(2 BYTE),
MR
VARCHAR2(2 BYTE),
ROUTE
VARCHAR2(4 BYTE),
SEQ
VARCHAR2(4 BYTE),
DISC_IND
VARCHAR2(1 BYTE),
FREEZE_CODE
VARCHAR2(1 BYTE),
MTH40
NUMBER,
CONCES_EC
NUMBER,
METER_COST_ARREARS
NUMBER,
METER_COST_PAID
NUMBER,
SANCTION_LOAD
NUMBER,
PENALTY_ON_CL
NUMBER,
CL_SLB
NUMBER,
UNTSLB
NUMBER,
CAPACIT_PENALTY
NUMBER,
ARREARS_OF_INT
NUMBER,
INT_ON_ARREARS
NUMBER,
FIXED_CHARGES
NUMBER,
ASSESSED_DPC
NUMBER,
FCA_UNT_OLD
NUMBER,
FCA_UNT_NEW
NUMBER,
DEFECT_RDN1
NUMBER,
DEFECT_RDN2
NUMBER,
CAP_CT_RENT
NUMBER,
CT_RENT
NUMBER,
ADV_BILL_IND
VARCHAR2(1 BYTE),
ADV_BILL_RD_IND
VARCHAR2(1 BYTE),
INST_IND
VARCHAR2(1 BYTE),
CONSCUR_STATUS
VARCHAR2(1 BYTE),
MTR_COST1
NUMBER,
MTR_COST2
NUMBER,
MTR_COST3
NUMBER,
LOOM_NOS
NUMBER,
CONS_OLD_TARIFF
NUMBER,
CONS_NEW_TARIFF
NUMBER,
PD_TD_DATE
VARCHAR2(6 BYTE),
ED5
VARCHAR2(10 BYTE),
ED6
VARCHAR2(10 BYTE),
ED8
VARCHAR2(10 BYTE),
B66_AMT1
NUMBER,
BILL_MTH
VARCHAR2(6 BYTE),
STD_MTH
NUMBER,
PREV_RD_MTH
VARCHAR2(4 BYTE),
ACCT_HD_TRF
VARCHAR2(2 BYTE),
ADM_CODE
NUMBER,
BILL_DUE_DATE
DATE,
EC_DUTY
NUMBER,
ABNOR_IND
VARCHAR2(1 BYTE),
TRF04_CONN_LOAD
NUMBER,
PROCESS_DT
DATE,
SUPPLY_DATE
VARCHAR2(6 BYTE),
BILL_DT_FROM
DATE,
RECEIPT_AMT
NUMBER,
LOCKED_CR_UNITS
NUMBER,
LOCKED_CHARGES
NUMBER,
LOCKED_ED
NUMBER,
LOCKED_FCA
NUMBER,
LOCKED_FC
NUMBER,
LOCKED_RLCHARGES
NUMBER,
LOCKED_CL
NUMBER,
LOCKED_ECEDFIX
NUMBER,
LOCKED_ACC_MONTH
NUMBER,
AVG_OLD_CONSMP
NUMBER(6),
AVG_SINCE
VARCHAR2(4 BYTE),
AVG_OCCURANCES
NUMBER(2),
AVG_MA_IND
VARCHAR2(1 BYTE),
MTR1_PHASE
NUMBER(1),
MTR_PHASE1
VARCHAR2(1 BYTE),
MTR2_PHASE
NUMBER(1),
IND_CAT
VARCHAR2(1 BYTE),
L61_TARIFF
NUMBER(2),
MTR_CHG_AMT1
NUMBER(12),
NO_OF_MONTHS
NUMBER,
MTR_CHG_AMT2
NUMBER(12),
B66_AMT
NUMBER(10),
ADJ_AMT11
NUMBER,
B66_ADJ_TYP
VARCHAR2(1 BYTE),
B60_AMT
NUMBER(10),
ADJ_AMT13
NUMBER,
B60_ADJ_TYP
VARCHAR2(1 BYTE),
CPF_NO
NUMBER(8),
ADJ1
NUMBER(9),
ADJ2
NUMBER(9),
ADJ3
NUMBER(9),
ADJ4
NUMBER(9),
ADJ5
NUMBER(9),
ADJ6
NUMBER(9),
ADJ7
NUMBER(9),
ADJ8
NUMBER(9),
ADJ11
NUMBER(9),
ADJ13
NUMBER(9),
DTC_CODE
VARCHAR2(7 BYTE),
TITLE
VARCHAR2(8 BYTE),
NAME
VARCHAR2(36 BYTE),
ADDRESS1
VARCHAR2(26 BYTE),
ADDRESS2
VARCHAR2(26 BYTE),
VILLAGE
VARCHAR2(14 BYTE),
PIN
VARCHAR2(6 BYTE),
LOCK_SINCE
VARCHAR2(4 BYTE),
FAULTY_SINCE
VARCHAR2(4 BYTE),
MTR_DIGIT1
VARCHAR2(1 BYTE),
MTR_DIGIT2
VARCHAR2(1 BYTE),
FCA_PAISE
NUMBER(9),
GTY_EXP_DT
VARCHAR2(6 BYTE),
REJ_READ_MTR1
NUMBER(6),
REJ_READ_MTR2
NUMBER(6),
REJ_ADJ_UNITS1
NUMBER(6),
REJ_CONSMP
NUMBER(6),
OWNER_CODE
NUMBER(1),
MTR_CAP_AMP
NUMBER(1),
MTR_A
VARCHAR2(1 BYTE),
MTR_C
VARCHAR2(1 BYTE),
MTR_D
VARCHAR2(1 BYTE),
MTR_E
VARCHAR2(1 BYTE),
CUT_OF_DT
DATE,
POLE
VARCHAR2(6 BYTE),
EDRATE
NUMBER(9),
AREA
VARCHAR2(1 BYTE),
MTR_BRAND1
VARCHAR2(2 BYTE),
MTR_BRAND2
VARCHAR2(2 BYTE),
LC1
NUMBER(3),
POWER_CUT_IND
VARCHAR2(1 BYTE),
SERVICE_DT
DATE,
ADJ_UNIT11
NUMBER,
ADJ_UNIT22
NUMBER,
RECEIPT_AMT1
NUMBER,
MTR1
NUMBER,
STRK_BLL_AMT
NUMBER,
DUTY_UNTS1
NUMBER,
DUTY_AMT1
NUMBER,
DUTY_UNTS2
NUMBER,
DUTY_AMT2
NUMBER,
DUTY_UNTS3
NUMBER,
DUTY_AMT3
NUMBER,
ADJ_UNIT_45
NUMBER,
ADV_BIL_EC
NUMBER,
NEW_DUTY_RATE
NUMBER,
NEW_DUTY_UNTS
NUMBER,
NEW_DUTY_AMT
NUMBER,
DPC_PAB
NUMBER,
MS9_SINCE
VARCHAR2(4 BYTE),
DISTRICT_CODE
NUMBER(2),
TAX_ON_SALE
NUMBER,
LOCKED_CHARGES_TSE
NUMBER
ORGANIZATION
EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_DIR
ACCESS PARAMETERS
( records delimited by newline
badfile
'ext.bad'
logfile 'ext.log'
fields
ID POSITION
(1-4),
PC POSITION
(7-7),
BU POSITION
(8-11),
CONSUMER_NO POSITION
(18-29 ),
CUR_READING1 POSITION
(33-41 ),
CUR_READING2 POSITION
(42-50 ),
ADJ_CONS1 POSITION
(51-59 ),
ADJ_CONS2 POSITION
(60-68 ),
TOT_EC POSITION
(69-86),
TOT_FCA POSITION
(87-104 ),
TOT_ED POSITION
(105-122 ),
ADDLESS_AMT POSITION
(123-140 ),
NETBILL_AMT POSITION
(141-158 ),
ADJ_UNIT1 POSITION
(159-167 ),
ADJ_UNIT2 POSITION
(168-176 ),
TARIFF_CODE POSITION
(177-178 ),
DUTY_CODE POSITION
(179-180 ),
DISCONN_TAG POSITION
(181-181 ),
MIN_CHRG_IND POSITION
(182-182 ),
OC_CODE1 POSITION
(183-183 ),
OC_CODE2 POSITION
(184-184 ),
OC_AMT1 POSITION
(185-202 ),
OC_AMT2 POSITION
(203-220 ),
PREV_DPC POSITION
(221-238 ),
CREDIT_AVG_BILL POSITION
(239-256 ),
ADJ_TYPES POSITION
(257-264 ),
ADJ_EC_FCA POSITION
(265-282 ),
ADJ_ED POSITION
(283-300 ),
ADJ_AMT1 POSITION
(301-318 ),
ADJ_AMT2 POSITION
(319-336 ),
ADJ_AMT3 POSITION
(337-354 ),
ADJ_AMT4 POSITION
(355-372 ),
ADJ_AMT5 POSITION
(373-390 ),
ADJ_AMT6 POSITION
(391-408 ),
ADJ_AMT7 POSITION
(409-426 ),
ADJ_AMT8 POSITION
(427-444 ),
MR_CYCLE POSITION
(445-446 ),
NOTICE POSITION
(447-448 ),
INSTAL_IND POSITION
(449-449 ),
LAST_RCPT_DT POSITION
(453-458 ),
MS1 POSITION
(459-459),
MS2 POSITION
(460-460),
ARR_PL_CR POSITION
(461-478 ),
PREV_READ1 POSITION
(479-487 ),
PREV_READ2 POSITION
(488-496 ),
OLD_CONS_NUM POSITION
(497-512 ),
MTR_CODE1 POSITION
(513-514 ),
MTR_CODE2 POSITION
(515-516 ),
ABR_EC1 POSITION
(517-534 ),
ABR_FCA1 POSITION
(535-552 ),
REV_CAT POSITION
(553-554 ),
BILL_DT POSITION
(555-560 ) DATE "DDMMYY",
SD_PAID POSITION
(561-569 ),
SD_ARRS POSITION
(570-578 ),
SD_ADDL POSITION
(579-587 ),
PR_RDNG_IND1 POSITION
(588-588 ),
PR_RDNG_IND2 POSITION
(589-589 ),
NAB_IND POSITION
(590-590 ),
CONN_LOAD POSITION
(592-600 ),
OLDEST_OS_DT POSITION
(601-604 ),
ABR_RECAMT1 POSITION
(605-622 ),
METER_RENT POSITION
(623-631 ),
EX_DUTY POSITION
(632-649 ),
TDL_CHARGES POSITION
(632-649 ),
ABR_MTH POSITION
(650-651 ),
READING_IND POSITION
(652-652 ),
FB_IND POSITION
(653-653 ),
ADJ_AMT POSITION
(654-671 ),
MTR_NUM1 POSITION
(672-681 ),
MTR_NUM2 POSITION
(682-691 ),
AVG_UNITS1 POSITION
(692-700 ),
AVG_UNITS2 POSITION
(701-709 ),
MIN_BILL_AMT POSITION
(710-727 ),
METER_COST_DEMANDED POSITION
(710-727 ),
MF1 POSITION
(728-729),
MF2 POSITION
(730-731),
MR POSITION
(732-733),
ROUTE POSITION
(734-737),
SEQ POSITION
(738-741),
DISC_IND POSITION
(742-742 ),
FREEZE_CODE POSITION
(743-743 ),
MTH40 POSITION
(744-752),
CONCES_EC POSITION
(753-770 ),
METER_COST_ARREARS POSITION
(753-770 ),
METER_COST_PAID POSITION
(771-788 ),
SANCTION_LOAD POSITION
(789-797 ),
PENALTY_ON_CL POSITION
(798-815 ),
CL_SLB POSITION
(816-817 ),
UNTSLB POSITION
(818-819 ),
CAPACIT_PENALTY POSITION
(820-837 ),
ARREARS_OF_INT POSITION
(838-855 ),
INT_ON_ARREARS POSITION
(856-873 ),
FIXED_CHARGES POSITION
(874-891 ),
ASSESSED_DPC POSITION
(892-909 ),
FCA_UNT_OLD POSITION
(910-927 ),
FCA_UNT_NEW POSITION
(928-945 ),
DEFECT_RDN1 POSITION
(982-990 ),
DEFECT_RDN2 POSITION
(991-999 ),
CAP_CT_RENT POSITION
(1000-1008 ),
CT_RENT POSITION
(1009-1017 ),
ADV_BILL_IND POSITION
(1018-1018 )
LOCATION
(EXT_DIR:'rgtr1.txt')
REJECT
LIMIT UNLIMITED
LOGGING
NOCACHE
NOPARALLEL;KUP-04020: found record longer than buffer size supported, number, in string
Cause: a record in the data source was longer than the maximum data size supported. The number reported is the maximum supported size of a record.
Action: none
Examine your bad file and log files for details of the rows which failed from insertion. -
SQL Loader versus External Table
If anyone has worked on external tables please let me know your views.
user637544 wrote:
for sqlldr i follow the following approach
1. truncate table
2. call sqlldr and load records in staging table
3. check for bad records
how do i tuncate, call external table and check bad records for external table.As part of the SQL*Loader control file you can tell it to truncate the table as part of the process before it loads in the data.
The key differences between SQL*Loader and External Tables are:
1. SQL*Loader is an external utility run from the o/s command line, whereas External tables are usable from within SQL and PL/SQL.
2. SQL*Loader can only load data up into the database, whereas External tables can allow you to read files and write files (10g onwards)
3. SQL*Loader has limited control on skipping rows etc. whereas External tables can be queried using SQL and has all the flexibility that SQL can offer.
4. SQL*Loader requires connection information to the database, whereas External tables are already part of the database
5. SQL*Loader can only change the source filename through dynamic o/s level scripts, whereas External tables can have the filename changed using an ALTER TABLE ... LOCATION ... command.
If you want to truncate your staging table before loading it with data from the external table, then you will just have to do that as a seperate step, because the external table is not associated with other tables. Simply truncate the other table and then query the data from the external table into the staging table.
External tables offer a lot more flexibility than using SQL*Loader. -
External Table vs SQL Loader.
Hi,
Pls anybody can tell me what is the significant differences between external table and SQL Loader.Both fall into category of Oracle utilities
[SQL*Loader|http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/utility.htm#i10606] is the one that loads data into Oracle tables from operating system files and [external table|http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/utility.htm#i10611] is the one that
is providing functionality similiar as SQL*Loader in the means of accessing external data but with with a different logic and rules,it lets you access data in external sources as if they were in a table in the database. -
Modifying field lenght for an external table via OWB
Hi folks,
After, I would like to thanks everyone that helps to improve the level of quality of this forum with questions and answers!
I am having a problem with flat files and external tables:
I can't specify the field length in the ORACLE_LOADER parameters via OWB, so the driver consider that all my fields are CHAR(255). Concerning the online documentation for Oracle Utilities Part. no. A96652-01 on page 12-21, it's write that the lack of specification about the datatype or length of a field, the driver will assume the fields name and order of the fields defined on the external table fields and they will be CHAR(255). My problem is that we need to use a field bigger than CHAR(255), so I made this external table for example about our problem:
CREATE TABLE "TESTE"
"NOME" VARCHAR2(300),
"SOBRENOME" VARCHAR2(300))
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY TARGET_LOC_SRC_FILES_LOC
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
CHARACTERSET WE8MSWIN1252
STRING SIZES ARE IN BYTES
NOBADFILE
NODISCARDFILE
NOLOGFILE
FIELDS
TERMINATED BY ';'
NOTRIM
"NOME" ,
"SOBRENOME"
) LOCATION (
TARGET_LOC_SRC_FILES_LOC:'Partners.txt'
REJECT LIMIT UNLIMITED
NOPARALLEL
When we put by hand the field length in this script, it works fine!
Is there a way to put the length of the fields in the FIELDS clause of the SQL*Loader control file using OWB?Carlos,
Have you tried the following:
- Update the data types in the sampled flat file (i.e. go into the field definitions and edit the length).
- Go into the mapping and inbound reconcile the table (right-mouse click the file operator and select inbound reconcile).
- Regenerate, and review the result.
Thanks,
Mark. -
External Tables & Non English Characters
Hi
I am new to external tables, i wanted to know what i need to do to upload the data which is of non-English characters,
Example
i need to upload the data where the single file will have data for more than one non-english characters.
1. English
2. Chinese
3. Korean
let me know if any other alternative exists for the same.
Regards
YramHi,
a good reference for External Tables is the manual: http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/part_et.htm
If they are in one file, you can upload them all at once. Important will be how the data is stored in the file (UTF-8, UTF-16). This information you should set in the external table by using the CHARACTERSET clause, see the manual.
Your database also needs to support these characters!
Herald ten Dam
htendam.wordpress.com -
Unable to read chinese characters in a flat file to external table
Hi All,
We have a flat file containing data in chinese. We are using external table to read data in files. When i do select <coulmn-name> from <table> it displays box for the chinese characters. The column is of type varchar2.
The NLS_LANGUAGE is AMERICAN and NLS_CHARACTERSET is AL32UTF8.
The character set is mentioed as UTF8 in external table defnition.
Is the external table not reading these charcters properly? Should any patch be installed or some settings should be changed for sql developer to to display chinese character?The NLS_LANG environment variable/registry string variable (You are just one of the 1000s of 'anonymous' users refusing to post platform and version), so NOT NLS_LANGUAGE, on the server hosting the file, should be set to anything ending in .AL32UTF8
Sybrand Bakker
Senior Oracle DBA
Maybe you are looking for
-
My itouch is disabled, when I tried to restore it, it came up with Error code 3094. Has anyone had this error code appear for them before and how were they able to fix it? Thank You
-
App store got a updates for me, but its not my Apple ID
I bought a second hand MacBook Pro from a colleague of mine at work, he erased all the things he wanted to save to himself and I deleted is user name and created my own user name and became the new Admin. ive updated to the new operating system "Yose
-
Help -- No Devices appear in iTunes
I no longer have a "Devices" section listed on the left-hand side of iTunes. My ATV is version 2.1 and my computer is running Windows XP SP3. Everything was running fine until recently, about the time I upgraded to iTunes 8.0.0.35. On the ATV when I
-
Stop Outlook from Automated Send/Receive
Is there any way within the Oracle Beehive Connector so that receiving of email is not done automatically? I could make it offline but I would prefer not to do that.
-
Just switched from 10.7-ish to Yosemite on a couple of machines including the Mac Pro. I have a HP ZR24w display hooked up to the computer that has been working fine. Now, Yosemite on it's own, changes the scaled size of my screen from the recommende