Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Procedures - Result Sets
where's your problem?
SQL> CREATE OR REPLACE package reftest as
2 type t_Cur is ref cursor; 3 Procedure ups_empl(home_store in varchar2, storeCursor in outt_Cur);
Package created.
SQL> create table emp(emp_cd varchar2(5), hphone varchar2(5), country
varchar2(5),
2 home_store_cd varchar2(5), termdate date);
Table created.
SQL> create table emp_slsp (emp_cd varchar2(5));
Table created.
SQL> CREATE OR REPLACE package body reftest as
2 Procedure ups_empl(home_store in varchar2, storeCursor in out t_Cur) 3 is 4 begin 5 open storeCursor for 6 SELECT EMP_CD, HPHONE EXT, COUNTRY STATUS 7 FROM EMP 8 WHERE HOME_STORE_CD = HOME_STORE 9 AND TERMDATE IS NULL 10 AND EMP_CD IN (SELECT EMP_CD 11 FROM EMP_SLSP)12 ORDER BY EMP_CD;
Package body created.
Klaus
"Jeff" <jeff.cichocki_at_wgrfurniture.com> schrieb im Newsbeitrag
news:932og0$vsi$1_at_nnrp1.deja.com...
> I know that you pointed me to that web site two days ago, but my
> problem isn't on the VB side. It's in the procedure that I'm trying to
> create. I can't seem to get the syntax correct to even get it to
> compile. If I can get the procedure to work, I'm sure I can make the
> leap in VB to retrieve it.
>
> Please excuse my frustrated tone. I'm getting extremely frazzled by
> this project, and I'm almost out of time. This one procedure is start
> of all others. Without it, the whole project is useless.
>
> In article <932lmd$9tp$07$1_at_news.t-online.com>,
> "Klaus Zeuch" <KZeuch_at_hotmail.com> wrote:
> > I already answered your question 2 days ago: look at
> > http://osi.oracle.com/~tkyte/ResultSets/index.html . It should be
easy to
> > modify the vb example given there.
> >
> > Klaus
> > "Jeff" <jeff.cichocki_at_wgrfurniture.com> schrieb im Newsbeitrag
> > news:932ej4$mev$1_at_nnrp1.deja.com...
> > > I had posted a message before regarding this topic, but I'm just not
> > > seeing the answer and I 'm running out of time to make this thing
work.
> > >
> > > I have all of my procedures working (in VB) except one. This is the
> > > only one that returns a result set. I can not get it to work.
Could
> > > someone please help me fix the following procedure? I took out
> > > everything I did regarding cursors, as I don't seem to be able to
grasp
> > > what I'm doing and I figured it would be easier to add than correct.
> > >
> > > CREATE OR REPLACE PROCEDURE CUSTOM.UPS_EMPL
> > > (HOME_STORE IN VARCHAR2) AS
> > > BEGIN
> > > SELECT EMP_CD, HPHONE EXT, COUNTRY STATUS
> > > FROM MISC.EMP
> > > WHERE HOME_STORE_CD = HOME_STORE
> > > AND TERMDATE IS NULL
> > > AND EMP_CD IN (SELECT EMP_CD
> > > FROM EMP_SLSP)
> > > ORDER BY EMP_CD;
> > > END;
> > >
> > > Thanks to anyone who can help.
> > >
> > >
> > > Sent via Deja.com
> > > http://www.deja.com/
> >
> >
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Thu Jan 04 2001 - 16:13:02 CST
![]() |
![]() |