01-24-2017
10 More Discussions You Might Find Interesting
1. Solaris
I have created 3 Procedures all similar to this one:
I then created 3 shell sripts which will call the sql? finally created a calling script to call the procedure. I am a bit unsure how to this all works, can someone check my code and I am doing this right? Also could I add my procedure (first... (0 Replies)
Discussion started by: etravels
0 Replies
2. Shell Programming and Scripting
hai,
can anybody say how to call or to execute an oracle stored procedure in oracle from unix...
thanks in advance.... for ur reply....
by,
leo (2 Replies)
Discussion started by: Leojhose
2 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Want to know if is it possible to run / execute any stored procedures (sybase) from unix command prompt.?
Thanks for your help in Advance.
Regards,
Arvind S. (0 Replies)
Discussion started by: Arvind_temp
0 Replies
4. UNIX for Advanced & Expert Users
Hi All,
I want to run/execute a stored procedure (sybase) from unix command prompt not by login in isql utility which is provided my Sybase guys.
Is there way ..?
Thanks in advance for your help !!!
Regards,
Arvind S. (0 Replies)
Discussion started by: arvindcgi
0 Replies
5. Shell Programming and Scripting
Greetings,
I need to make an open server call to a shell script from inside a Sybase Stored procedure.
Coul any one please provide a sample code?
TIA (0 Replies)
Discussion started by: rajpreetsidhu
0 Replies
6. Shell Programming and Scripting
Hi,
I am writing a script that needs to call a stored proc which would update a column in a table based on a condition.
I need to also capture the number of rows updated.
However, When I execute the script I keep getting this error:
./test_isql.sh: syntax error at line 33: `end of file'... (3 Replies)
Discussion started by: karthikk
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
My stored procedure returns a value.
How to retrieve the value and display in unix.
Stored procedure
CREATE OR REPLACE
PROCEDURE gohan(num INT) IS
BEGIN
DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num);
END;
Unix Scripting i used
sqlplus -s... (7 Replies)
Discussion started by: gohan3376
7 Replies
8. Shell Programming and Scripting
Greeting everyone. Ok, I have spent the past few days googling for this and I keep hitting a wall. Many results brought me here, but the solutions were not quite right for this.
Basically my script (ksh) is run with an arg for a csv. My script so far appears to be storing the values from my... (4 Replies)
Discussion started by: dezdiggler
4 Replies
9. How to Post in the The UNIX and Linux Forums
Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies
10. Shell Programming and Scripting
Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies
LEARN ABOUT PHP
sybase_unbuffered_query
SYBASE_UNBUFFERED_QUERY(3) SYBASE_UNBUFFERED_QUERY(3)
sybase_unbuffered_query - Send a Sybase query and do not block
SYNOPSIS
resource sybase_unbuffered_query (string $query, resource $link_identifier, [bool $store_result])
DESCRIPTION
sybase_unbuffered_query(3) sends a query to the currently active database on the server that's associated with the specified link identi-
fier. If the link identifier isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link
as if sybase_connect(3) was called, and use it.
Unlike sybase_query(3), sybase_unbuffered_query(3) reads only the first row of the result set. sybase_fetch_array(3) and similar function
read more rows as needed. sybase_data_seek(3) reads up to the target row. The behavior may produce better performance for large result
sets.
sybase_num_rows(3) will only return the correct number of rows if all result sets have been read. To Sybase, the number of rows is not
known and is therefore computed by the client implementation.
Note
If you don't read all of the resultsets prior to executing the next query, PHP will raise a warning and cancel all of the pending
results. To get rid of this, use sybase_free_result(3) which will cancel pending results of an unbuffered query.
PARAMETERS
o $query
-
o $link_identifier
-
o $store_result
- The optional $store_result can be FALSE to indicate the resultsets shouldn't be fetched into memory, thus minimizing memory
usage which is particularly interesting with very large resultsets.
RETURN VALUES
Returns a positive Sybase result identifier on success, or FALSE on error.
EXAMPLES
Example #1
sybase_unbuffered_query(3) example
<?php
$dbh = sybase_connect('SYBASE', '', '');
$q = sybase_unbuffered_query('select firstname, lastname from huge_table', $dbh, false);
sybase_data_seek($q, 10000);
$i = 0;
while ($row = sybase_fetch_row($q)) {
echo $row[0], ' ', $row[1], '<br />';
if ($i++ > 40000) {
break;
}
}
sybase_free_result($q);
sybase_close($dbh);
?>
NOTES
Note
This function is only available when using the CT library interface to Sybase, and not with the DB library.
SEE ALSO
sybase_query(3).
PHP Documentation Group SYBASE_UNBUFFERED_QUERY(3)