Home » SQL & PL/SQL » SQL & PL/SQL » how can i return the resultset directly to the calling code (oracle 10g release 2)
how can i return the resultset directly to the calling code [message #425273] Thu, 08 October 2009 06:46 Go to next message
abhi_shakya
Messages: 50
Registered: September 2009
Location: Nepal
Member
create or replace procedure getuserprofile(id in varchar2,pwd in varchar2,fcl_yr in varchar2)
is
login_id varchar2(30);
full_details varchar2(50);
emp_id number;
emp_name varchar2(50);
user_groupid number;
password varchar2(50);
email varchar2(50);
access_blocked varchar2(50);
location_id number;
location_name varchar2(50);
type_id number;
type_name varchar2(50);
year varchar2(20);

begin
select l.loginid,l.fulldetails,l.employeeid,e.firstname||' '||e.lastname,l.groupid,l.password,l.email,l.accessblocked,e.locationid,lo.locationname,lo.typeid,lt.typename,fcl_yr into login_id,full_details,emp_id,emp_name,user_groupid,password,email,access_blocked,location_id,location_name,
type_id,type_name,year
from login l,employees e,locations lo,locationtype lt
where l.employeeid=e.employeeid
and e.locationid=lo.locationid
and lo.typeid=lt.typeid
and l.loginid=id
and l.password=pwd;

exception
when others then
dbms_output.put_line('No such user exist');
end;
/



this is not good enough for me....i need to return the result direct to the calling portion of my application code....how can i do that? please help soon...
Re: how can i return the resultset directly to the calling code [message #425278 is a reply to message #425273] Thu, 08 October 2009 06:56 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Ref Cursors
Previous Topic: fastest way to update value
Next Topic: VARCHAR2 to Date Format Conversion
Goto Forum:
  


Current Time: Thu Dec 08 06:24:48 CST 2016

Total time taken to generate the page: 0.08363 seconds