Re: Any suggestions with this updated code????
- From: "jamesfreddyc" <jamesfreddyc@xxxxxxxxxxx>
- Date: 2 Sep 2005 07:47:05 -0700
I am unsure of the answers to your questions. This Oracle sproc is so
dang foreign compared to SQLServer sproc's, I simply cannot make sense
of what you are asking! Sorry for not totally understanding/answering
your questions (which I know are to help get this thing working),
perhaps someone can suggest the answers by looking at what is in the
contents of this oracle package....
j
I was provided 2 things: "prop1.sql" and "declare2.txt" ----
***** this is the contents of prop1.sql ******
--Create a package to declare a ref cursor globally
create or
replace package property1 as
type results_record_type is record (
locn property.locn%type,
locs property.locs%type,
name1 property.name1%type,
id property.id%type);
type props_ref_type is ref cursor return results_record_type;
--This proc will open the refcursor
procedure open_prop(rc_prop in out props_ref_type,
street_no in varchar2, street_name in varchar2);
procedure close_prop(rc_prop in out props_ref_type);
end property1;
/
show errors
create or replace package body property1 as
procedure open_prop(rc_prop in out props_ref_type,
street_no in varchar2, street_name in varchar2)
is
v_str varchar2(23):='%'||street_name ||'%';
v_no varchar2(6):= '%'|| street_no ||'%';
begin
open rc_prop for
select locn, locs, name1, property.id from property
where locn = v_no and locs = v_str;
end open_prop;
procedure close_prop(rc_prop in out props_ref_type)
is
begin
close rc_prop;
end close_prop;
end property1;
/
show errors
***********
**** this is the contents of declare2.txt ****
declare
v_property property1.results_record_type;
props_cursor property1.props_ref_type;
begin
property1.open_prop(props_cursor,'6000','AIRPO');
loop
fetch props_cursor into v_property;
exit when props_cursor%NOTFOUND;
-- look at or process the fields in v_prop_record
end loop;
property1.close_prop(props_cursor);
end;
/
******
.
- Follow-Ups:
- Re: Any suggestions with this updated code????
- From: Paul Clement
- Re: Any suggestions with this updated code????
- References:
- Re: Any suggestions with this updated code????
- From: Paul Clement
- Re: Any suggestions with this updated code????
- From: jamesfreddyc
- Re: Any suggestions with this updated code????
- From: Paul Clement
- Re: Any suggestions with this updated code????
- Prev by Date: Re: Any suggestions with this updated code????
- Next by Date: Re: Best way to update a record
- Previous by thread: Re: Any suggestions with this updated code????
- Next by thread: Re: Any suggestions with this updated code????
- Index(es):
Relevant Pages
|