开发者

Oracle error:- LRM-00116: syntax error at 'control' following '='

开发者 https://www.devze.com 2023-04-11 20:18 出处:网络
Oracle DB/Windows XP:- I am running an batch file开发者_StackOverflowthat calls an“.ctl” filewhich in turn calls an “.xls” file, both present in the same folder.

Oracle DB/Windows XP:- I am running an batch file 开发者_StackOverflowthat calls an “.ctl” file which in turn calls an “.xls” file, both present in the same folder. The idea is to load the data onto Oracle db present on an remote oracle server.(non local machine)

I am getting this error, no matter what I do.

Oracle error:- LRM-00116: syntax error at 'control' following '='

The .bat file code is as below

    rem SET SQLLOGIN=remod/P3w1d0ry@wsd

    pause Ready to Load the remo.Temp_data Table

    sqlldr userid=%SQLLOGIN% control=TempData.ctl errors=100 

    pause

The .ctl file is as follows:-
LOAD DATA
INFILE "data.xls"
replace
into table remo.Temp_data
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
test_abbr "rtrim(:test_abbr)",
test_pk       "rtrim(:test_pk)",
test_sk       "rtrim(:test_sk)",
test_dt       "rtrim(:test_dt)",
test_email       "rtrim(:test_email)",
)


You've remarked out the the SET of SQLLOGIN. Also you might want to put a call in front of the sqlldr statement. You'll also need some data to load...

SET SQLLOGIN=remod/P3w1d0ry@wsd

pause Ready to Load the remo.Temp_data Table

call sqlldr userid=%SQLLOGIN% control=TempData.ctl data=mydata.csv errors=100 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号