Subject | Re: [firebird-support] Getting only as many records for given qty. |
---|---|
Author | Mark Rotteveel |
Post date | 2011-11-05T08:15:53Z |
On 5-11-2011 8:53, venussoftop wrote:
the amount of rows returned:
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-select.html#langrefupd25-select-rows
--
Mark Rotteveel
> Hi allSort by the purchase date descending and use the ROWS clause to limit
>
> I know a qty. for a particular item purchased. This item though has been purchased over a long period only the last few purchase bills are now of concern (FIFO method). I have the following tables
>
> tPurchaseBill
> iID PK
> iNo Bill No.
> etc.
>
> sPurchaseBillItems
> iID PK
> iPID FK to tPurchaseBill table
> iItemID FK to mItems table
> bQty qty. in this purchase
> etc.
>
> so if I am to provide an iItemID and a bStock qty. can I bring out only those last few tPurchaseBill records. Is there any way I can do this in pure SQL?
the amount of rows returned:
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-select.html#langrefupd25-select-rows
--
Mark Rotteveel