ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel to Oracle without user intervention (https://www.excelbanter.com/excel-discussion-misc-queries/136116-excel-oracle-without-user-intervention.html)

Illya Teideman

Excel to Oracle without user intervention
 
Hello, I'm having a problem where I need to get data from excel into oracle.
I have got 99% of the way there but I can't get telnet to run the sqlldr
command automatically. I'm wondering if anyone knows of a better way to do
this all in excel. A little bit of history for you. At the moment in excel I
create a csv file from the contents of one of the worksheets. I then create
two files a batch file and a script file. I dump all these in %temp% then I
shell the batch file to call the script and FTP the CSV file to a server.
This works fine.
Then also in excel I create a CTL file (Needed for sqlldr command) and two
similar files for the FTP, I shell this out and FTP the CTL file over. So now
I have two files the CSV and the CTL file on the server (and a bunch of
leftover rubbish in my %temp% folder which I'll clean up later). All good so
far... Now what I need to do is get the contents of the CSV file into oracle.
I can do this manually using telnet logging in and running "sqlldr
[user]/[password] control=CTLFILE.CTL skip=2". This works fine and loads all
the data, however my question is how can I automate this so the load is
seamless to the end user? Telnet appears to be the weakest link here so I'm
wondering if there is a way of getting the sqlldr command to run via excel or
some other ingenious method of doing this (Without any 3rd party
applications).


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com