Hi Lars
Can it be like that record got deleted/updated but invalid flag was not updated for some reason in main store?
This is really an interesting problem, would be interested to know the root cause.
Another interesting observation is when he used "18" in where clause he got DispatchOrder 20. When he used Like 20, he still got DispatchOrder 20.
How that can be possible even if that field is not PK ?