You could spool the output from Oracle to a file, then interogate the file.
In Unix script ....
sqlplus $USER @$BATCH/somesql.sql $GMT_OFFSET >> $BATCHLOG
In somesql.sql ..... (in part) ...
Code:
SET SERVEROUTPUT ON SIZE 1000000 FORMAT WRAPPED
SET LINESIZE 250
SET PAGESIZE 50000
SET NEWPAGE 0
SET HEADING OFF
SET RECSEP OFF
SET FEEDBACK OFF
SET TERMOUT OFF
SET VERIFY OFF
SET DEFINE ~
SPOOL $SQLREPORT/somesql_report.txt;
--PL/SQL block
DECLARE
........
AND F.FINALISED_DATE + (~1 / 24) > RUN_DATE1
AND F.FINALISED_DATE + (~1 / 24) <= RUN_DATE2)
AND F.ADD_TIMESTAMP + (~1 / 24) > RUN_DATE1
AND F.ADD_TIMESTAMP + (~1 / 24) <= RUN_DATE2)
......
From my simple understanding of sql, the ~1 substitutes for the value of $GMT_OFFSET.
Hope the above is of some help to you.
Last edited by Cameron; 03-26-2008 at 03:07 AM..
Reason: Addition: ~1 explaination.
Friends,
I'm trying to do below in ksh script, while requesting user to provide src_db and dest_db values
1. Extract src_db and dest_db Oracle home from oratab file
2. Don't find db if it starts with comment (#)
3. Compare both values
4. Message success or exit with error if they don't... (0 Replies)
Hi all,
My oracle procedure returns more than one value.
i need to get one value at a time upto ending value ina shell script.
Please help me..... (9 Replies)
Hi,
How to retrieve two different date values(min & max) from the oracle table and assign to two different variables in the shell script to process further.
With Regards (8 Replies)
Hello,
I'm trying to do a select for an Oracle table but the output gives me only filelds values without fields name as in Informix.
Is there anyway to display both in output ?
For instance, the output will be :
Name Rico
Age 30
Position Engineer
Thx, (5 Replies)
hi
I have two tables in oracle DB and am using a joining query which will result in the output as follows.
i need to assign it to a two dimensional array and use it for my further calculations.
the way i tried is as follows.
#!/bin/ksh
export... (1 Reply)
i have an oracle function which returns two values, one is the error message if the function encounters anything and another one which returns a number
i need to capture both
and pass it on to unix shell script
how to do it (2 Replies)
Hi
i am calling a stored procedure from unix shell like this call
test_proc('0002','20100218');
the stored procedure was giving output
like this dbms_output.put_line(' processed earlier');
i want to see the output in the unix shell where i called.
Thanks
barani (6 Replies)
Hi all
I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so...
The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (5 Replies)