10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
i am having .sql script which inserts data from one table to another table based on date condition, i need to pass range on based on how many number of months, for e.g
set timing on;
whenever sqlerror exit failure;
spool myscript.log append
accept start_date... (7 Replies)
Discussion started by: rohit_shinez
2. Shell Programming and Scripting
$ echo $SHELL
Requirement - How to pass oracle sql script as argument to unix shell script?
$ ./output.sh users.sql
Below are the shell scripts and the oracle sql file in the same folder.
$ cat output.sh
.... (7 Replies)
Discussion started by: a1_win
3. Shell Programming and Scripting
I have a script where I make a sqlplus connection. In the script I have multiple sql queries within that sqlplus connection. I want the result of the queries to be stored in shell variables declared earlier. I dont want to use procedures. Is there anyway else.
Thanks in advance..
Cheers (6 Replies)
Discussion started by: gonchusirsa
4. 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
5. Shell Programming and Scripting
There are 4 parameters that I have to pass from korn shell to sql script.
1) I have to check if $1 , $2 , $3 and $4 are null values or not .
How can I do that ?
2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Discussion started by: megha2525
6. UNIX for Advanced & Expert Users
I am unable to use parameter in sql script passed from unix script.
my sql script CREATE_SBI_LIST_GROUP.sql is like this -
sga sga,sales_genl_provision sgp , comm_product_condn cpc... (2 Replies)
Discussion started by: apskaushik
7. Shell Programming and Scripting
This is for an Oracle journal import. I was using a pl/sql package and oracle API's. Oracle added invoker rights to their API's and now my package won't run. I didn't want to use their API's anyway. The only reason i was using pl/sql and the API's (just a package) was to utilize a cursor. How... (2 Replies)
Discussion started by: lmu
8. Shell Programming and Scripting
I like to pass a variable to a sql file in a unix script..
I tried a below code..
db2 -vf test.sql 200903
test.sql is as below.
select * from db2.users where quarter = $1;
Please tell me where i go wrong..
Thanks in advance,
Magesh (2 Replies)
Discussion started by: mac4rfree
9. Shell Programming and Scripting
I am calling a script "b" from script "a". In script "a", i connect to database and get month and year. I have to pass these same values to script b. How can i do that. How can i pass parameters from one script to another (3 Replies)
Discussion started by: vasuarjula
10. Shell Programming and Scripting
i want to use multple sql count statements and store these count values in unix variable but in one connection only i.e. in only 1 time database should be hit ,which is the main requirement. (1 Reply)
Discussion started by: sw@pnil