CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
how to write a oracle cursor whioch returns more than one row

 



Tejas
User

Nov 6, 2013, 10:14 AM

Post #1 of 1 (497 views)
how to write a oracle cursor whioch returns more than one row Can't Post

Hi
My coide is below

my %cursor2 = (
'Get_Entries' => qq{
SELECT distinct customer_id,entry_type_id,amount from prepaid_customer_entries where ENTRY_SOURCE_ID=?
}
);

while (my $line=<Recovery>) {
chomp;
my @row = split (",",$line);
$Key = $row[4];
my @Values = $session->array_for_cursor('Get_Entries',0,$Key);
}
In this code, this is just returning one row
But there are two rows for each key , when i fired a query in DB dircetly.

DB OUTPUT

CUSTOMER_ID ENTRY_TYPE_ID ENTRY_AMOUNT
----------- ------------- ------------
7574937805 381 -1.29
7574937805 331 1.29


Please help me , how can i get the same output as sqlplus from perl script

Thanks
Tejas

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives