Connected to oracle database
sqlplus << EOF
$CONNECTSTR
set heading off
set trimspool on
set feedback off
select ID,DATE from sysadm.TEST where VALUE = 'A' order by ID;
value_id = ID
value_date = DATE
EOF
1. Is it possible to reference the values, ID,DATE in unix shell script.
2.... (20 Replies)
Hi,
I am passing an argument for the script and that argument values should exist in database.
bill_period_input="'""$1""'"
bill_period=`sqlplus uname/pwd@dbname <<eof!
set verify off
set heading off
set feedback off
select bill_period from bill_period_ref where... (4 Replies)
How do I dynamically assign the below output to unix shell variables
so I can build a menu in a shell script?
Example:
var1 = 1 var2= SYSTEM
var3 = 2 var4= UNDOTBS1
and so on, then in the shell script I can use the variables to build a menu.
set serveroutput on
declare... (2 Replies)
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
I am getting sqlplus not found error while trying to connect to database from unix.
my sql plus is present at the location
/opt/dbms/app/oracle/product/10.2_Client
and i gave in shell script as below.
ORACLE_HOME=/opt/dbms/app/oracle/product/10.2_Client
export ORACLE_HOME
Please help me with... (6 Replies)
Hi Frnds,
I wanto load the data thats in data file with comma(,) delimited.
it throw this errors
SQL*Loader-951: Error calling once/load initialization
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified
Plz look at my file... (3 Replies)
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
I used the following code
code
select * from tablename where columnname
Instead of printing the expected output it prints all the files in the present directory since there is a "*" in the code. Is there any way to overcome the problem?
Thanks
Ananth (2 Replies)
Hello,
I have a script to get the information from database, however, it's look like the loop is not work, can someone help? :confused:
echo Input file list to check:
read filelist
for file in 'cat $filelist.txt'
do
echo "select FILENAME from FILE_TABLE where filename like '${file}'%;" >>... (9 Replies)