[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: ? Last Record



Hello,

Here is my $.02 worth.  When I have to know in advance when the end of a
select is coming up, I simply select 1 row ahead of my processing.  So I
select the first row, do nothing, select the second, process the first
and so on.  Then after the "end-select" I process the last row.  This
has only happened a few times.

Why do you want to know when the last row is selected?

Often you can do what you want by using negative positions on a print
statement (assuming that you are printing a report).

Hope this helps,
Eric

Boris Nadler wrote:
>
> Phil,
>
> #END-FILE is used for the flat files processing:
> "The variable #end-file is set to one (1) if end of file occurs on READ.
> Otherwise it is set to zero (0). Your program should check this variable
> after each READ command"
>
> I'd use BEGIN-SELECT twice : first to get rows count and then to do special
> frocessing
> for the last row. Its not very efficient but I'm not aware about system
> variable or function
> you can use for the last row processing in SQR.
>
> Hope its help.
>
> Boris.   ( Qualcomm Inc., 619/651-8571 )
>
> At 04:17 PM 10/7/98 -0400, you wrote:
> >
> >
> >I do believe there is a reserved variable called
> >
> >#END-FILE
> >
> >that is internally kept within the SQR.  It is set to 1 if the end of file
> >occurs.
> >I have never used it, so I can not help you there.
> >
> >Hope it helps,
> >
> >Cheers,
> >
> >Danny
> >
> >
> >
> >
> >
> > (Embedded
> > image moved   Phil Roell <phil.roell@NATINST.COM>
> > to file:      10/07/98 03:44 PM
> > pic25032.pcx)
> >
> >
> >
> >
> >Please respond to SQR-USERS@USA.NET
> >
> >To:   Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
> >cc:    (bcc: Daniel Guynes)
> >Subject:  ? Last Record
> >
> >
> >
> >
> >Does SQR provide a flag that tells you when it has selected the last record
> >in a
> >select statement?
> >
> >Thanks,
> >
> >Phil
> >
> >
> >
> >