Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Loader to load certain columns

2832249Apr 20 2016 — edited Apr 20 2016

Hi,

When i am trying to load specific columns from a data sheet using sql loader, the sql loader picks the column based on position , bot by the column reference. E.G.

SQL Loader script :

OPTIONS(SKIP=1, ERRORS=100)

LOAD DATA

--CHARACTER SET "UTF8"

CHARACTERSET WE8ISO8859P1

INFILE  '/Test/Bharat/abc.csv'

--INFILE "$FILE"

APPEND INTO TABLE "TEST_BHARAT"

FIELDS TERMINATED BY ","

OPTIONALLY ENCLOSED BY '"'

TRAILING NULLCOLS

--WHEN (01) != 'T'

             (

                         

                          AC                                             "TRIM(:AC)",

                          AD                                             "TRIM(:AD)",

                          LAST_UPDATE_DATE               "SYSDATE",

                          LAST_UPDATED_BY                 "FND_GLOBAL.USER_ID"  ,

                          CREATION_DATE                      "SYSDATE",

                          CREATED_BY                            "FND_GLOBAL.USER_ID"

             )

Data File :

 

AAABACADAE
123456789127325
4564644564544546546
478792156478944789

When i am trying to load the data from the columns AC and AD, the sql loader is loading the values from column AA and AB instead of AC and AD.

Can you help me how to get the data loaded from the correct column?

Regards,

Bharat.

This post has been answered by KayK on Apr 20 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2016
Added on Apr 20 2016
2 comments
1,553 views