10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
when I execute from psql prompt, I get the result, when I try to automate
using a shell script, the query is not working
# `/usr/bin/psql -U postgres -d coba1 -c "select name from users where
"Date" > current_date - 30;"`
ERROR: column "Date" does not exist
LINE 1: select... (2 Replies)
Discussion started by: srilinux09
2 Replies
2. UNIX for Advanced & Expert Users
Hi Guys,
I am calling a SQL script which runs under while loop, i need to exit the while loop if i get error in sql script which is called
while
do
sqlplus -s user/pass@db @test.sql id$i
done
test.sql
whenever sqlerror exit;
alter table t1 add &1 number;
I need to come out of... (2 Replies)
Discussion started by: rohit_shinez
2 Replies
3. Shell Programming and Scripting
Hi Gurus,
I have a script which send sql query to oracle db and return value to my script.
dummy code like below:
sqlplus -s user/${PASSWD}@${ORACLE_SID} @${DIR}/query.sql > outputfile
using above code, when query has error, it send error to same out put file and exit code is 0, is... (6 Replies)
Discussion started by: ken6503
6 Replies
4. Shell Programming and Scripting
I am connecting to sql databases through shell script. Databases that i am connecting will need password change every 60 days. This is according to our security policy and cannot be changed. But this is creating problem when connecting to Databases through shell script . To connect to oracle DB we... (2 Replies)
Discussion started by: pallvi_mahajan
2 Replies
5. Shell Programming and Scripting
Hi,
I am trying to call sql script from ksh job with parameters.The parameters passed from ksh job will be used in SELECT query in sql file to SPOOL the data in extract file.My questions are:
1) How to call a sql script from ksh job with parameters?
2) How to use the parameter in sql file to... (1 Reply)
Discussion started by: anil029
1 Replies
6. Shell Programming and Scripting
I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts.
Here is my script
#!/bin/csh -f
source .orapass
set user = $USER
set pass = $PASS
cd /opt/data/scripts
echo... (2 Replies)
Discussion started by: allinshell99
2 Replies
7. UNIX for Dummies Questions & Answers
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)
Discussion started by: reptile
1 Replies
8. Shell Programming and Scripting
Hi I am getting this error while connecting to sql through a shell script, whereas i am able to connect to sql directly.
It was working properly earlier, no clue why i am getting this.
Please find the log below:
FTP to <IP> completed Wed Apr 30 11:42:01 BST 2008
Program ended. Wed Apr 30... (1 Reply)
Discussion started by: nehak
1 Replies
9. Shell Programming and Scripting
Hi-
I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment...
I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies
10. Shell Programming and Scripting
hi ,
I tried running a PL/SQL script through unix shell script.
But am getting the following error.
"Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus "
Kindly suggest.
Regards,
Samit (5 Replies)
Discussion started by: dharmesht
5 Replies