Subject | Re: [ib-support] Re: Problem with FB's SP |
---|---|
Author | Arno Brinkman |
Post date | 2002-11-27T12:42:35Z |
Hi,
Maybe something like (untested) :
FOR
SELECT
ID_VALUE
FROM
DOC_TABLE
INTO
:INTVAR
DO BEGIN
SELECT
FIRST 1
SKIP :INTVAR
VALUE
FROM
TABLES
ORDER BY
VALUE
INTO :SOMEVALUE
SUSPEND;
END
Regards,
Arno
> To start with, I don't see my message and the replies.Hmmmm Sometimes you must have patience.
>
> I had to look into the group to find them.
> > I don't see what you want to achieve with this procedure, pleaseThirth ? In what order ?
> tell us
> > more.
> >
>
> Ok, say you have 2 tables:
>
> DOC_TABLE composed of
> 1) ID_Table
> 2) ID_Value
> 3) ID_Document
>
> TABLES composed of
>
> 1) ID_TABLE
> 2) VALUE
>
> ID_VALUE in DOC_TABLE means the number of values in the "subtable"
> represented by ID_TABLE.
> To be clearer, immagine that TABLES has 4 elements with the same
> ID_TABLE and a different VALUE value for each record.
> If I have an ID_VALUE of 3 then I want the third of the 4 records.
Maybe something like (untested) :
FOR
SELECT
ID_VALUE
FROM
DOC_TABLE
INTO
:INTVAR
DO BEGIN
SELECT
FIRST 1
SKIP :INTVAR
VALUE
FROM
TABLES
ORDER BY
VALUE
INTO :SOMEVALUE
SUSPEND;
END
Regards,
Arno