How can I fetch and retreive data(of each result set) of multiple result set from sybase by calling a stored procedure using perl DBI module on an unix solaris environment?????
Please help (3 Replies)
How I can get the logs that are getting stored in specific location in unix server
through an Apache web server installed in unix server?
Requirement is to access the logs through the URL in windows browser without any access. (1 Reply)
Currently my Pro*c program is fetching a cloumn which is defined as LONG in oracle db. The data in the column is around 65k. But when I am FETCHing it to a varchar variable, I am only getting 22751 bytes of data using cursor.
Is there any limitation on the data which is fetched by a cursor in... (2 Replies)
Hi Experts,
I have created a table with columns as empname,empid,phone,shiftname. Now I am having a .csv file format which contains the shift datas of the employees. I have to fetch this file and compare with the table I created to send an alert to the specified user. (2 Replies)
Data
I was trying to write shell script which will be return the output in the below format
First i was trying to do these using sed.
sed -n '/.ksh/p' mainksh.ksh
sed -e 's/*\(.*\)/\1/g' mainksh.ksh
$RUN_DIR, $SUB_DIR and the variables which will be defined in the profile file.
when i am... (0 Replies)
Hi Guys,
Please help me with my problem here:
I have a source file:
1212 23232 343434 ASAS1 4
3212 23232 343434 ASAS2 4
3234 23232 343434 QWQW1 4
1134 23232 343434 QWQW2 4
3212 23232 343434 QWQW3 4
and a mapping... (4 Replies)
Here's a database query which looks up the NAME column of PRODUCT table
SELECT NAME FROM PRODUCT ;
And this query retrieves me the following output
SUGAR
COCOA
HONEY
WHEAT
CABBAGE
CAULI FLOWER
Please note the last record CAULI FLOWER contains TWO blank spaces between the two words.
... (4 Replies)
Hi All,
I'm facing issue while using script.
Chk_Etl_Status=`cat /dstage/questnet/qnetdv/input/Etl_Status.dat|cut -d"," -f1`
echo Chk_Etl_Status=$Chk_Etl_Status
above result is giving me sometime value as 1 and sometime error message as
Chk_Etl_Status=
dsjoblaunch.sh: test: Specify a... (5 Replies)
Hello Gurus,
I am trying to fetch a required number of lines from an output of a command which is in tabular form.
Below is the command for reference along with how the result is being shown on UNIX shell.
/usr/openv/volmgr/bin/vmquery -b -p 5
The result of the above command is as... (6 Replies)
Discussion started by: Ali Sarwar
6 Replies
LEARN ABOUT PHP
db2_next_result
DB2_NEXT_RESULT(3) 1 DB2_NEXT_RESULT(3)db2_next_result - Requests the next result set from a stored procedureSYNOPSIS
resource db2_next_result (resource $stmt)
DESCRIPTION
A stored procedure can return zero or more result sets. While you handle the first result set in exactly the same way you would handle the
results returned by a simple SELECT statement, to fetch the second and subsequent result sets from a stored procedure you must call the
db2_next_result(3) function and return the result to a uniquely named PHP variable.
PARAMETERS
o $stmt
- A prepared statement returned from db2_exec(3) or db2_execute(3).
RETURN VALUES
Returns a new statement resource containing the next result set if the stored procedure returned another result set. Returns FALSE if the
stored procedure did not return another result set.
EXAMPLES
Example #1
Calling a stored procedure that returns multiple result sets
In the following example, we call a stored procedure that returns three result sets. The first result set is fetched directly from
the same statement resource on which we invoked the CALL statement, while the second and third result sets are fetched from state-
ment resources returned from our calls to the db2_next_result(3) function.
<?php
$conn = db2_connect($database, $user, $password);
if ($conn) {
$stmt = db2_exec($conn, 'CALL multiResults()');
print "Fetching first result set
";
while ($row = db2_fetch_array($stmt)) {
var_dump($row);
}
print "
Fetching second result set
";
$res = db2_next_result($stmt);
if ($res) {
while ($row = db2_fetch_array($res)) {
var_dump($row);
}
}
print "
Fetching third result set
";
$res2 = db2_next_result($stmt);
if ($res2) {
while ($row = db2_fetch_array($res2)) {
var_dump($row);
}
}
db2_close($conn);
}
?>
The above example will output:
Fetching first result set
array(2) {
[0]=>
string(16) "Bubbles "
[1]=>
int(3)
}
array(2) {
[0]=>
string(16) "Gizmo "
[1]=>
int(4)
}
Fetching second result set
array(4) {
[0]=>
string(16) "Sweater "
[1]=>
int(6)
[2]=>
string(5) "llama"
[3]=>
string(6) "150.00"
}
array(4) {
[0]=>
string(16) "Smarty "
[1]=>
int(2)
[2]=>
string(5) "horse"
[3]=>
string(6) "350.00"
}
Fetching third result set
array(1) {
[0]=>
string(16) "Bubbles "
}
array(1) {
[0]=>
string(16) "Gizmo "
}
PHP Documentation Group DB2_NEXT_RESULT(3)