Imagine that you have a table with following fields:
Enabled Field No. Field Name Data Type Length Description
Yes 1 ID Integer
Yes 2 ReceptID Integer
Yes 3 Regelnr Integer
Yes 4 ReceptItem Text 50
Yes 5 Hoeveelheid Decimal
Yes 6 Percentage Decimal
Yes 7 ExtraOmschrijving Text 150
Yes 8 ToonAlsVolumeJN Boolean
Yes 9 ToonTussentotaalJN Boolean
I need a method inside this table which will return me the
highest integer value of the field Regelnr...
This function should receive a filter, namely the ReceptID
So for a given receptID i need the highest Regelnr
How do you do this?
0
Answers
If you don't have the index, but you have another index that starts with ReceiptID, you can also use that, but the code gets somewhat more complex, but you avoid a new index:
This last is slower in the reading then the first, but it avoids the overhead of an extra index that makes it slower for writing.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!