Hi,
I have browsed few websites but could not find solution to problem though it looks silly.
Error SQL*Loader-350: Syntax error is thrown while sqlldr command is run from a shell script. All the columns are of fixed length and each record in flat file has 204 characters.
1. I have a shell script that call sqlldr. below is the command in script
$SQLLDR USERID=usernm/passwd@instancenm CONTROL=filename.ctl DATA=DATAFILE
2. Below is the control file content
LOAD DATA
APPEND
INTO TABLE SDITBL
WHEH src_code = 'S'
(
batch_num "session_number.nextval",
seq_num "tech_key.nextval",
lvl_number POSITION(1:18) char,
xref_from POSITION(<b>30:34</b>) char,
xref_to POSITION(<b>35:39</b>) char,
src_code POSITION(29:29) char,
name_full POSITION(40:74) char,
quantity POSITION(75:81) char,
date_created POSITION(82:89) date "YYYYMMDD",
og_lvl_number POSITION(90:97) char,
pmg_number POSITION(198:204) char
)
WHEH src_code = 'D'
(
batch_num "session_number.nextval",
seq_num "tech_key.nextval",
lvl_number POSITION(1:18) char,
xref_from POSITION(<b>19:23</b>) char,
xref_to POSITION(<b>24:28</b>) char,
src_code POSITION(29:29) char,
name_full POSITION(40:74) char,
quantity POSITION(75:81) char,
date_created POSITION(82:89) date "YYYYMMDD",
og_lvl_number POSITION(90:97) char,
pmg_number POSITION(198:204) char
)
sample line below from input flat file
1006356 S 441 Inter Test1 4 20210611441
Please let me know where I am going wrong.
Imran