Subject | [Ticket #115] [firebird-support] Re: Getting only as many records for given qty. |
---|---|
Author | Desarrollo |
Post date | 2014-03-07T18:27:27Z |
This is a notification from the Help Desk.
On Mar 07, 2014 @ 03:27 pm, venussoftop@... wrote:
--- In firebird-support@yahoogroups.com, Mark Rotteveel <mark@...> wrote:
>
> On 5-11-2011 8:53, venussoftop wrote:
> > Hi all
> >
> > 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?
>
> Sort by the purchase date descending and use the ROWS clause to limit
> the amount of rows returned:
> http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-select.html#langrefupd25-select-rows
>
>
> --
> Mark Rotteveel
>
Thanks Mark for your response. Yes, I can limit the number of rows to something that is practical and not the whole set. But I do not think I will be able to convert the bStock qty. into number of rows as the qty. would be different in each purchase bill. Any suggestions on this front.
Thanks and regards
Bhavbhuti
------
This is an automated response. Your issue has been noted. We'll be in touch soon.
Please reply to this email or visit the URL below with any additional details.
http://DANTOIN:9675/portal/view-help-request/115
[Non-text portions of this message have been removed]