I have a shell script (.sh) that works in Unix but I'd like to convert it into a Windows batch file (.bat):
cat >flog.ctl <<_EOF
LOAD DATA
INFILE '$1.log' "str ';'"
APPEND INTO TABLE flog
fields terminated by '=' TRAILING NULLCOLS
(
filename constant '$1'
,num char
,data char
)
_EOF
sqlldr <username>/<password>@<instance> control=flog.ctl data=$1.log
I'm not too knowledgable on batch files but if an answer is some hints rather than a complete solution then I'm sure I'll muddle through. This is to help with an answer to another question here.
Windows batch files do not support inlining data this way. You'll have to
Windows batch files denote variables in ECHO statements using % signs, i.e. %1%.
So you're resulting file would be something like:
There are some complicated solutions as far as the inlining goes, but as was already mentioned, a simple solution would be to use
echo
.