SQL Loader ; SQL [message #632108] |
Sun, 25 January 2015 05:37 |
|
mapps0999@gmail.com
Messages: 19 Registered: October 2013 Location: Bangalore
|
Junior Member |
|
|
Hi , I want to write a sql query to check the data loaded into Oracle tables land in correct columns. We are loading huge data thrugh SQL Loader into oracle Table , all the data are getting loaded properly but after the load data are getting loaded in wrong columns e.g in the data file we have data data of country and .ctl file we have proper maping for country but after the load the country data is being loaded to county field in the database table. For this reason we want to Prepare sql queries to check the data loaded into the tables land in correct columns .Can anyone please help on this .
Thanks,
Mike
|
|
|
|
|
|
Re: SQL Loader ; SQL [message #632112 is a reply to message #632111] |
Sun, 25 January 2015 06:29 |
|
mapps0999@gmail.com
Messages: 19 Registered: October 2013 Location: Bangalore
|
Junior Member |
|
|
below is my control file . And the table strutcher is as per this . Hope this would help .
The .ct file :-
OPTIONS (silent=(header,feedback,discards),SKIP = 1, ERRORS=50, rows=500000)
load data
INFILE *
BADFILE 'xxrx_match.bad'
DISCARDFILE 'xxrx_match.dsc'
into table XX_SEAR_DATA
TRUNCATE
fields terminated by ','
optionally enclosed by '"'
TRAILING NULLCOLS
(
SCENARIO "
LTRIM(:SCENARIO)",
PARTY_ORIG_SYSTEM "RTRIM(:PARTY_ORIG_SYSTEM)",
PARTY_ORIG_SYSTEM_REFERENCE "TRIM(:PARTY_ORIG_SYSTEM_REFERENCE)",
COMPANYNAME NULLIF FIRSTNAME=BLANKS,
FIRSTNAME NULLIF FIRSTNAME=BLANKS,
LASTNAME NULLIF LASTNAME=BLANKS,
JOB NULLIF JOB =BLANKS,
ADD1 NULLIF ADD1=BLANKS,
CITY NULLIF CITY=BLANKS,
COUNTRY NULLIF FIRSTNAME=BLANKS,
PHONE NULLIF PHONE=BLANKS,
EMAIL NULLIF EMAIL =BLANKS,
URL NULLIF URL=BLANKS
)
|
|
|
|
|
|
|
|