10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Discussion started by: Rahul_Bhasin
2. UNIX for Dummies Questions & Answers
Hi all ,
I want to pass contents from a file say f1 as arguments to a sql query which has In statement using a script
select * from table_1 where login in ( `cat f1`) ;
will this work or is there any other way to do it. (1 Reply)
Discussion started by: zozoo
3. Shell Programming and Scripting
Im writing a script to run a bit of sql(via sqlplus) that pulls back some data and spools it to a file, I want the spool file to only display the data, with no sql command at the top and no reports at the bottom ie(# of records recieved).
I am currently doing it via a grep command but... (1 Reply)
Discussion started by: Magezy
4. Shell Programming and Scripting
I want to spool files from unix using a sql script that would
take values from another sql query within the KSH script..
select order_date from date_tbl
for each order_Date i need to call this spool script with the value
sqlplus scott/tiger@order_db @/ordspool/order_date.sql... (2 Replies)
Discussion started by: vr23
5. Shell Programming and Scripting
I'm trying to build a shell script that reads a set of accounts from a file. For each account I need to perform a set of sql queries. So I have a loop with a set of sqlplus connections to retrieved my data.
Is it possible to have a single sqlplus connection before entering the loop and... (4 Replies)
Discussion started by: lsantacana
6. UNIX for Dummies Questions & Answers
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
7. Shell Programming and Scripting
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
8. UNIX for Dummies Questions & Answers
Hi,I have a single sql file containing many create table ddl's.Example:
CREATE TABLE sec_afs
rpt_per_typ_c char(1) NOT NULL,
rpt_per_typ_t varchar(20) NULL,
EXEC sp_primarykey 'sec_afs', rpt_per_typ_c
GRANT SELECT ON sec_afs TO developer_read_only... (5 Replies)
Discussion started by: smarter_aries
9. Shell Programming and Scripting
Please help me out.
I have around 700 sql files to execute in a defined order, how can i do it from shell script (3 Replies)
Discussion started by: anushilrai
10. Shell Programming and Scripting
I would want to spool file for a database query, however by using crontab, the file is not spooled. Below shows my script:
$ORACLE_HOME/bin/sqlplus -s "/as sysdba"... (0 Replies)
Discussion started by: *Jess*