Re: INSERT INTO and MULTI-RECORD Pls Help!
Date: 2000/06/15
Message-ID: <yfc25.41$S92.14935_at_wdc-read-01.qwest.net>#1/1
Let's back up a minute, guys.
You want to put this data into a multi-record block in a form. Right? SELECT...INTO is not the way you do this. Instead:
Create View Summer_Payroll as
Select Name, SUM(amount_earned) Sum_Earned, SSN
from PAYROLL
where year = 2000 and pay_period < 15
group by Name, SSN;
The datablock SUMMER_PAYROLL will use this view.
Do the same thing for the academic year block.
Sounds too easy. What did I miss?
<times9_at_my-deja.com> wrote in message news:8iavru$1rd$1_at_nnrp1.deja.com...
> I tried the select into with and without the SUM(), and it poses the
> same problem. Can you elaborate further on using a cursor and looping
> through it? I think this is the solution I'm looking for. Thank you
> again for the help !
>
> > Sounds like you're doing a "SELECT...INTO", which will only work with
one and
> > only one row. These are OK if the situation warrants it, but
generally you
> > also need to trap the NO_DATA_FOUND and TOO_MANY_ROWS system
exceptions when
> > you use a SELECT...INTO. Sounds like you need a declared cursor that
you can
> > loop through.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Jun 15 2000 - 00:00:00 CEST