Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Unix shell script and Oracle data
Name: aetjansen Date: July 14, 2003 at 06:28:21 Pacific OS: Solaris (8?) CPU/Ram: ?
Comment:
Hi All, as a newby to unix I ask you this: I need to build a shell script that puts data from a csv file into an Oracle 8i databasethe width of the data in the csv file is filled with spaces where necessary, in order to get the same with for every field.
I donīt know how to do this, but I have to. I hope you can help!
If the .csv file is reasonably small (say under 100K) try reading it from PL/SQL using UTL_FILE. Otherwise use SQL*Loader, which is very fast but does involve you in shell scripts and control files.
If it's fixed-width format, it probably isn't csv.
In 9i, external tables let you query data files directly which simplifies things a lot.
Summary: On the Unix side, this korn shell script, will execute your SQL: Unforutunately, I don't know a way of informix creating an Excel spreadsheet. I think you're left with moving the text file to Window...
Summary: Hey everybody.. I am wondering what software should I download for my PC at home to write and compile Unix Shell Script? Please reply as soon as possible.. Cheers ...
Summary: How were you expecting to read a binary word document with a UNIX shell script? If your data is already in a text file you can easily parse the file and call the 'mail' or 'mailx' commands to send th...