Hi all,
I need to bring the message to log file.Teradat/Hp-Ux
script:
-----
### Update Log Table
bteq <<- EOC
.run file ${SRC_DATA}/logon.txt
.run file ${SRC_DATA}/dbstagebteq.txt
.set format off
.set foldline off all
.set sidetitles off
... (1 Reply)
Hi, I am trying to create sql statements from a file, but I have a problem with ':
This is what I do:
cat filex.txt | awk -F: '{print $1,"A","and personnavn like",$5}' | sed -e "s/^/select bruker.brukernavn, person.personnavn from bruker, person where brukernavn like '/" -e "s/$/' and... (2 Replies)
i am stuck with a problem ...
i have a shell script that gets the file name as input and performs the following operation...
it runs through a for loop inside from which i connect to sqlplus and run a procedure that creates a number of tables ..
there is no space in my server so we have made... (0 Replies)
Hi All,
I need to select one column from a table based upon the passed in parameter.
I tried this:
sqlplus -silent $MISP_USER << EOF
set feedback off;
set verify off;
set sqlprompt ""
SELECT mail_flag
FROM dailyjobs
WHERE job_name = '$1';
exit 0
EOF
exit... (1 Reply)
Hi All,
Using Solaris box
bash-3.00$ echo $BASH_VERSION
3.00.16(1)-release
I have a real bummer of a bug, basically Im running a bash script that executes a bash function "dbase_sql". The bash function accepts a parameter in the form of an Oracle update statement eg
... (1 Reply)
I have few .sql file at some location say /x/y/z. I want to execute those .sql files in UNIX server so that all packages,procedures can be applied on the database of the UNIX server. (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a phonebook program.
It should use functions to perform the required tasks. It should be menu-based,... (1 Reply)
Hi friends,
I would like to get some help on the following requirement. I have a SQL file with following things,
select 1 from dual;
select user from dual;
select sysdate
from
dual;
BEGIN
PL/SQL Code
END;
/
This file will be saved as sql file. When I run my expected shell script,... (1 Reply)
Hi Folks,
I have requirement to pull a bunch of SQL's from a table in DB and execute them in parallel and update the status of each query as and when they complete. Can you please help me with ideas on how this can be achieved?
create table list_of_sql
(
id number,
full_sql... (3 Replies)
Discussion started by: member2014
3 Replies
LEARN ABOUT PHP
sqlsrv_cancel
SQLSRV_CANCEL(3)SQLSRV_CANCEL(3)sqlsrv_cancel - Cancels a statementSYNOPSIS
bool sqlsrv_cancel (resource $stmt)
DESCRIPTION
Cancels a statement. Any results associated with the statement that have not been consumed are deleted. After sqlsrv_cancel(3) has been
called, the specified statement can be re-executed if it was created with sqlsrv_prepare(3). Calling sqlsrv_cancel(3) is not necessary if
all the results associated with the statement have been consumed.
PARAMETERS
o $stmt
- The statement resource to be cancelled.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
sqlsrv_cancel(3) example
<?php
$serverName = "serverNamesqlexpress";
$connectionInfo = array( "Database"=>"dbName", "UID"=>"username", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT Sales FROM Table_1";
$stmt = sqlsrv_prepare( $conn, $sql);
if( $stmt === false ) {
die( print_r( sqlsrv_errors(), true));
}
if( sqlsrv_execute( $stmt ) === false) {
die( print_r( sqlsrv_errors(), true));
}
$salesTotal = 0;
$count = 0;
while( ($row = sqlsrv_fetch_array( $stmt)) && $salesTotal <=100000)
{
$qty = $row[0];
$price = $row[1];
$salesTotal += ( $price * $qty);
$count++;
}
echo "$count sales accounted for the first $$salesTotal in revenue.<br />";
// Cancel the pending results. The statement can be reused.
sqlsrv_cancel( $stmt);
?>
NOTES
The main difference between sqlsrv_cancel(3) and sqlsrv_free_stmt(3) is that a statement resource cancelled with sqlsrv_cancel(3) can be
re-executed if it was created with sqlsrv_prepare(3). A statement resource cancelled with sqlsrv_free_statement(3) cannot be re-executed.
SEE ALSO sqlsrv_free_stmt(3), sqlsrv_prepare(3).
PHP Documentation Group SQLSRV_CANCEL(3)