reading a value into an oracle script [message #73699] |
Tue, 22 June 2004 00:18 |
Ciro
Messages: 1 Registered: June 2004
|
Junior Member |
|
|
Hi,
I need to read some values(ie - numbers) from a text file into an oracle script so that i dont need to keep entering values into the prompt when i run the script.
Can anyone help please?
Many thanks.
|
|
|
Re: reading a value into an oracle script [message #73750 is a reply to message #73699] |
Wed, 30 June 2004 04:47 |
Raghavendra M.K.
Messages: 10 Registered: September 2000
|
Junior Member |
|
|
I do not have the answer, If you want to implement this in WINDOWS.
In Unix,
You can write the shell script, which reads the value from the file and passes as the argument to the shell script.
For exampe:
Data file contains the department numbers.
dept.txt
--------
10
20
30
40
You can pass each of this to a .sql file as follows in the loop.
for i in `cat dept.txt`
do
sqlplus scott/tiger @sqlfile.sql $i
done
I hope it is helpfule to you.
Regards,
|
|
|