ich dynamische Steuerdatei wie unten in Shell-Skriptsqlldr Fehler für optionaly umschlossen von " '
`echo 'LOAD DATA' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'APPEND' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'INTO TABLE TJX_SCR_UPLOAD_HEADER' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'WHEN FILE_RECORD_DESCRIPTOR = ' \'FHEAD\' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'FIELDS TERMINATED BY ","' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'TRAILING NULLCOLS' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo '(' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'FILE_RECORD_DESCRIPTOR position(1),' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'LINE_NO FILLER,' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'SCHEDULE_NO ,' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'SCHEDULE_DATE_TIME date' \'YYYYMMDD\' ',' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'UPLD_TIME_STAMP sysdate,' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'SEQ_NO "' ${exec_seq} '",' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'FILENAME CONSTANT ' \'$FILENAME\' ',' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo 'STATUS CONSTANT "UPLOADED"' >> $CTL_DIR/tjx_sc_req_upld.ctl
echo ')' >> $CTL_DIR/tjx_sc_req_upld.ctl`
mit obigem Code des Shell-Skript arbeitet auch fine.But habe, wenn ich OPTIONALLY ENCLOSED BY '"'
neben fields terminated by
hinzufügen, wie unten gezeigt
echo 'FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' ' >> $CTL_DIR/tjx_sc_req_upld.ctl
ich erhalte Syntaxfehler
./tjx_sc_req_upld.ksh: line 109: syntax error at line 216: `(`' unexpected
wenn ich optional beiliegend entferne bekomme ich keinen fehler.
bitte helfen Sie mir