LOAD.ctl (Right Click on icon and Open with Notepad)
load data infile 'BOOK1.txt' insert into table TEMP_TABLE_TEST fields terminated by " " trailing nullcols ( DFLT_BIN_CODE , ITEM_CODE , OLD_CODE , CIL_CODE , QUANTITY_ON_HAND ITEM_RATE , ITEM_MAIN_DESC , PART_NO , ALT_PART_NO
)
,
LOAD.bat (MS-DOS Batch File // Right Click on icon and then click Edit // Edit window will open in Notepad)
By default,
sqlldr userid=MMS/MATERIALS@KPROD control=load.ctl log=PORT.log
SYNTAX:
sqlldr userid=MMS/MATERIALS@KPROD control=load.ctl log=PORT.log
BOOK1.txt The Ms-Excel File consisting of user’s data is formatted if necessary, the field columns are placed in sequence consistent with the sequence of columns specified in LOAD.ctl file and then the Excel Spreadsheet File is Saved As Filename : “Book1” and Save As Type: “Text (Tab delimited)”
The Original and Formatted Ms-Excel File containing User’s Data is as illustrated below:
And, after saving as BOOK1.txt i.e Filename : “BOOK1” “Text (Tab delimited)”, the BOOK1.txt looks like this:
and Type:
PORT.log After Double-Click on load.bat, Data Loading is done within few seconds and a log file,
PORT.log is generated that contains all informations regarding data loading, i.e, no. of records or rows loaded into the table , no. of records discarded due to data errors, etc.
If there is any problem with LOAD.ctl file content (syntax , logical and others, if any), BAD
file is created along with PORT.log File.