Re: Tricky forms 3.0 problem
Date: 9 Feb 1994 03:54:50 -0600
Message-ID: <CKyB0H.Lst_at_uk.ac.brookes>
Peggy Brown (oispeggy_at_ubvms.cc.buffalo.edu) wrote:
> Here's a tricky problem...any help would be appreciated.
Completely deleted, 'cos I couldn't follow the explanation
Could you please explain the data structures first, rather than leaving us to infer them from the solution to the problem?
> DEFINE PROCEDURE
> NAME = retrieve_procs
> DEFINITION = <<<
> procedure retrieve_procs is
> Cursor proc_cursor is select proc.procname
> from credmaster.proc
> where :resprivs.proccode = proc.proccode;
> Begin
> Open proc_cursor;
> Loop
> Fetch proc_cursor into :resprivs.procname;
> Exit when proc_cursor%notfound;
> End Loop;
> Close proc_cursor;
> End;
> *******************************************************************
This cursor is going to fetch a variable number of rows, and place
each one in turn into the field resprivs.procname, overwriting the
old value of that field. The result is that you only see the very
last row that it returns. This looks wrong to me...
Possibly:
Fetch proc_cursor into temp_var;
:resprivs.procname := :resprivs.procname || ' ' || temp_var;
or something like that?
-- _________________________ _______________________________ / Tommy Wareing \ / 'Happy, happy. Joy, joy!' \ | p0070621_at_brookes.ac.uk X said Ren & Stimpy | \ 0865-483389 / \ (Supplied by Simone, not me!) / ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Received on Wed Feb 09 1994 - 10:54:50 CET