0

Getting error

LRM-00116: syntax error at ')' following ')'

while executing the below SQL*Loader statement from shell script. However, if I execute the same single statement as command line argument, then it is working fine.

Can you please help to understand this error?

sqlldr USR/PWD@HOST control=<(echo "LOAD DATA INFILE input.csv BADFILE input.csv_bad DISCARDFILE input.csv_dsc INSERT INTO table TEMP_INPUT_TBL FIELDS TERMINATED BY ',' TRAILING NULLCOLS (CBPID,SAM_KEY,HHID)") 
1
  • I think it related to escape character. Commented Sep 25, 2018 at 17:11

1 Answer 1

1

Why do you do it that way? Normally, you'd create a control file (let's call it load.ctl) and use it while running SQL*Loader, e.g.

LOAD DATA 
INFILE input.csv 
BADFILE input.csv_bad 
DISCARDFILE input.csv_dsc 

INSERT INTO table TEMP_INPUT_TBL 
FIELDS TERMINATED BY ',' 
TRAILING NULLCOLS 
(CBPID,SAM_KEY,HHID)

and then

sqlldr USR/PWD@HOST control=load.ctl
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.