10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team,
I am trying to run a sqlplus script against several databases via a FOR/LOOP and also passing the loop variable to a sqlplus script I am calling, as follows:
#!/bin/bash
export ORACLE_SID=plgc1
export ORACLE_HOME=/opt/oracle/product/11.2.0.2/db_1
export... (1 Reply)
Discussion started by: jonnyd
1 Replies
2. UNIX for Beginners Questions & Answers
hi guys
i have a sqlplus :
sqlplus -s username/password << EOF
@mysql.sql
EOF
in mysql.sql there is a count of a table, i want to write in a variabile unix.
how can i do?
Thanks a lot
Regards
Francesco. (3 Replies)
Discussion started by: Francesco_IT
3 Replies
3. Programming
i have file in which i have employee id are there and every time number of employee id are different in file means number of count of employee id in file are every time different.
343535435
365765767
343534543
343543543
i want to pass this file to sqlplus
and sql command is
... (7 Replies)
Discussion started by: pallvi_mahajan
7 Replies
4. Shell Programming and Scripting
echo "set echo off"; echo "set feedback off"; echo "set linesize 4000"; echo " set pagesize 0"; echo " set sqlprompt ''"; echo " set trimspool on";
Select statement is mentioned below
echo "select res.ti_book_no from disney_ticket_history res where res.ti_status =${STATUS} and... (7 Replies)
Discussion started by: aroragaurav.84
7 Replies
5. Shell Programming and Scripting
Hi,
I ahve a unix code as below.
sqlTxt=$*
sqlReturn=`echo "set feedback off;
set heading off;
set term off;
set verify off;
set serveroutput on size unlimited
set lin 1000;
VARIABLE GV_return_val NUMBER;
VARIABLE GV_script_error varchar2(4000);
EXEC :GV_return_code := 0;
EXEC... (6 Replies)
Discussion started by: bhaski2012
6 Replies
6. Shell Programming and Scripting
Hi,
I am writing a script which creates an external table using a shell script. My requirement is like this.
Usage: . ./r.ksh <table_name> - this should create an external table.
e.g . ./r.ksh abc - this should create an external table as abc_external.
How do i achieve this? Please... (5 Replies)
Discussion started by: Anaramkris
5 Replies
7. UNIX for Dummies Questions & Answers
Need to select count(*) from table to check for zero result in unix script (2 Replies)
Discussion started by: struggle
2 Replies
8. UNIX for Advanced & Expert Users
Hi,
I want to input unix variable to sqlplus.The following is working fine
sqlplus username/password @dummy.sql param1 param2 << EOF
create user $1 identified by $2;
EOF
But I dont want any file name to be passed,I just want to pass the parameter. Is there any way to that??
Thanks... (3 Replies)
Discussion started by: sakthi.abdullah
3 Replies
9. UNIX for Dummies Questions & Answers
hi ,
how to pass unix variable to oracle
code is .............
#! /bin/ksh
echo enter date vale
read date1
sqlplus x/y@oracle
select * from emp where statrt_date= $date1
is this is correct way... (1 Reply)
Discussion started by: chiru
1 Replies
10. Shell Programming and Scripting
Hi,
I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers.
Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
Discussion started by: rwunwla
6 Replies