10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Guys,
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
7 Replies
2. Shell Programming and Scripting
Hi all,
$ echo $SHELL
/bin/bash
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.
Shell Script
$ cat output.sh
#!/bin/bash
.... (7 Replies)
Discussion started by: a1_win
7 Replies
3. 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
11 Replies
4. Shell Programming and Scripting
Hi,
I am new to Shell Scripting, and I need to create nicknames for 600 tables in db2. I have the file names in a text file and i have to pass these table names to a shell script create nicknames in db2. Can some one please help me in this regard. (1 Reply)
Discussion started by: kamalanaatha
1 Replies
5. Shell Programming and Scripting
Hi Guys,
I like to pass a variable to a sql file in a unix script..
I tried a below code..
var=200903
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
2 Replies
6. Shell Programming and Scripting
I need to pass a variable as a parameter from shell script into a DB2 database.
var=bhuk_1123_Q_11/22/09
select * from tbl1 where serial_id='$var';
I have tried executing it using
db2 -tvf scriptname
Somebody please help me out with this. It is throwing an error. Please tell me how... (2 Replies)
Discussion started by: ss3944
2 Replies
7. Shell Programming and Scripting
How to pass the input to the execution script
ex: test1.sh contains
#! usr/bin/sh
read val
echo $val
test2.sh contains
#! /usr/bin/sh
./test1.sh
now I am calling test2.sh thro command line
and I want to pass the input to the script test1.sh from test2.sh ..I mean not... (6 Replies)
Discussion started by: vastare
6 Replies
8. Shell Programming and Scripting
I have a db2 stored procedure on my database which require 3 parameters, I have the following db2 command in a sql script
CONNECT TO SAMPLE;
CALL BACKUP(INPUT_1, INPUT_2, INPUT3);
Usually, I would just invoke this sql script from my shell script like below
db2 -tf... (1 Reply)
Discussion started by: mpang_
1 Replies
9. Shell Programming and Scripting
I am trying to close of multiple users in an Oracle database. Each users has records in multiple tables what I need to do is use a script that call each SQL seperately passing either CLI arguments or gathered arguments from the users during run time.
## Accept variable(s) from the command line... (1 Reply)
Discussion started by: jagannatha
1 Replies
10. UNIX for Dummies Questions & Answers
I need to do the following:
1) find files in certain directories that have todays date stamp
2) use these files as input arguements into another command (1 Reply)
Discussion started by: bobbygrep
1 Replies