Not sure about the encoder, but you can make regular choices and ordering and just use the first record to be returned, i.e. ignore those that come after that.
Basically, this is what the SQL engine does for you when you specify TOP 1 .
Thorsten
source share