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)
if
then
# mail -s "Import failed file does not exist" sanjay.jaiswal@xyz.com
echo "FILE does not exist"
exit 1
fi
echo "FILE EXIST"
size=-1
set $(du /export/home/oracle/nas/scott21.dmp.gz)
while
do
echo "Inside the loop"
size=$1
set $(du... (1 Reply)
Can someone tell me why I'm getting error when I try to run this?
#!/bin/csh -f
source ~/.cshrc
#
set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus
#
set count=`$SQLPLUS -s ${DB_LOGIN} << END
select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
So, I would like to run differen select queries on multiple databases..
I made a script wich I thought to be called something like..
./script.sh sql_file_name out.log
or to enter select statement in a command line..
(aix)
and I did created some shell script wich is not working..
it... (6 Replies)
Hello everyone,
I have a RHEL 5 system and have been trying to get a batch of 3-4 scripts each in a separate variables and they are not working as expected.
I tried using following syntax which I saw a lot of people on this site use and should really work, though for some reason it doesn't... (3 Replies)
I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this?
Is there a way to have a persistent connection to oracle database... (9 Replies)
HI,
I want to connect to database and fetch the count from a table.
The sql query is as below :
select count(*) from table_test where test_column='read';
How can I print the output of this statement using shell script.
Thanks in advance. (4 Replies)
Using ksh, I am using SQLPlus to execute a query with a filter using a string variable.
REPO_DB=DEV1
FOLDER_NM='U_nmalencia'
FOLDER_CHECK=$(sqlplus -s /nolog <<EOF
CONNECT user/pswd_select@${REPO_DB}
set echo off heading off feedback off
select subj_name
from subject
where... (5 Replies)
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
LEARN ABOUT PHP
ovrimos_result_all
OVRIMOS_RESULT_ALL(3)OVRIMOS_RESULT_ALL(3)ovrimos_result_all - Prints the whole result set as an HTML tableSYNOPSIS
int ovrimos_result_all (int $result_id, [string $format])
DESCRIPTION
Prints the whole result set as an HTML table.
PARAMETERS
o $result_id
- A result identifier, returned by ovrimos_execute(3) or ovrimos_exec(3).
o $format
- Optional HTML attributes for the generated table element.
RETURN VALUES
Returns the number of rows in the generated table.
EXAMPLES
This will execute an SQL statement and print the result in an HTML table.
Example #1
Prepare a statement, execute, and view the result
<?php
$conn = ovrimos_connect("db_host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res = ovrimos_prepare($conn, "select table_id, table_name
from sys.tables where table_id = 7");
if ($res != 0) {
echo "Prepare ok!";
if (ovrimos_execute($res, array(3))) {
echo "Execute ok!
";
ovrimos_result_all($res);
} else {
echo "Execute not ok!";
}
ovrimos_free_result($res);
} else {
echo "Prepare not ok!
";
}
ovrimos_close($conn);
}
?>
Example #2
ovrimos_result_all(3) with meta-information
<?php
$conn = ovrimos_connect("db_host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res = ovrimos_exec($conn, "select table_id, table_name
from sys.tables where table_id = 1");
if ($res != 0) {
echo "Statement ok! cursor=" . ovrimos_cursor($res) . "
";
$colnb = ovrimos_num_fields($res);
echo "Output columns=" . $colnb . "
";
for ($i=1; $i <= $colnb; $i++) {
$name = ovrimos_field_name($res, $i);
$type = ovrimos_field_type($res, $i);
$len = ovrimos_field_len($res, $i);
echo "Column " . $i . " name=" . $name . " type=" . $type . " len=" . $len . "
";
}
ovrimos_result_all($res);
ovrimos_free_result($res);
}
ovrimos_close($conn);
}
?>
PHP Documentation Group OVRIMOS_RESULT_ALL(3)