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.
sql query in unix scritp
Name: rajkumargnv Date: August 5, 2004 at 10:09:04 Pacific OS: SCO Unix CPU/Ram: 512
Comment:
I have a batch file that starts up the oracle, executes a query and spools the result to a text file and exits. The code goes like this... sqlplus ccn/yak25 @C:\temp\script.sql notepad.exe C:\temp\output.txt
and script.sql has the code: spool C:\temp\output.txt select * from emp; spool off exit
I want to do the same job on Unix, do I write a shell script like this #!/bin/sh
sqlplus 'username/password@instance' '@dir/query.sql>dir/output.txt exit OR nave the same spool stteaments in the query.sql file and delete dir/output.txt from the script?
Summary: I want to write a query in shell that retrieves the users from a user table in oracle and then send an email to the user list output. How can i do that in shell script. any idea? ...
Summary: Hi i have written a shell script which runs some sql queries in oracle. the code looks like this sqlplus username@NJCMTOMS/password < $HOME/devel/oms/arg/cleanupsql.sh cleanupsql.sh has the sqls to...
Summary: Hi There I have created a small script to extract data from an table and output to txt file. Since the table contains more 100 columns I want to select few main columns around 20 and then extract the ...