Re: [firebird-support] FIRST 1 of each iItemID

2017-08-12 Thread setysvar setys...@gmail.com [firebird-support]
> I have a view and the following query which returns multiple records from the view (see below) for each iItemID > > SELECT iItemID > , cID > , dDt > , bRate >FROM vwPriceListHistory >ORDER by iItemID, dDt DESC, cID DESC > > What I want is one first recor

Re: [firebird-support] Re: FIRST 1 of each iItemID

2017-08-12 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 12-8-2017 13:33, venussof...@gmail.com [firebird-support] wrote: > > > Hi Mark > > I have updated the original post with the new cID column values > > I have a view and the following query which returns multiple records > from the view (see below) for each iItemID > > > SELECT iItemID >

[firebird-support] Re: FIRST 1 of each iItemID

2017-08-12 Thread venussof...@gmail.com [firebird-support]
Hi Mark I have updated the original post with the new cID column values I have a view and the following query which returns multiple records from the view (see below) for each iItemID SELECT iItemID , cID , bRate FROM vwPriceListHistory ORDER by iItemID, cID DESC What

Re: [firebird-support] FIRST 1 of each iItemID

2017-08-12 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 12-8-2017 13:03, venussof...@gmail.com [firebird-support] wrote: > But still how can I get the rate attached to the top most dDt for each > iItemID. > > Please advise I'm not sure what you mean. -- Mark Rotteveel

Re: [firebird-support] FIRST 1 of each iItemID

2017-08-12 Thread venussof...@gmail.com [firebird-support]
Hi Mark Thanks for that. What I have done is I have expanded the original cID with a mmdd at the start of each value, so the dDt column is now not needed. But still how can I get the rate attached to the top most dDt for each iItemID. Please advise Kind regards Bhavbhuti

Re: [firebird-support] FIRST 1 of each iItemID

2017-08-12 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 12-8-2017 08:28, venussof...@gmail.com [firebird-support] wrote: > I have a view and the following query which returns multiple records > from the view (see below) for each iItemID > > > SELECT iItemID > , cID > , dDt > , bRate > FROM vwPriceListHistory > OR