Sorting problems with address list (base data import into writer)

I have a base file to keep track of my contacts and once in a while i print out an address list of everything. For that I connect the database with writer.
I print the addresses using the mail merge function of writer. Everything works fine alright but the entries are not sorted. All of them are in the right order in the database table and I double check in writer.
Why is it that the output is not following the order provided by the table?
For an address list this is really quite annoying and doesn’t really serve the purpose of a reference document.
Thank you very much for your support.

Which version of LO and which OS ?
When you say you double-check in Writer, what do you mean ?
There are 2 main ways to do a mailmerge, as you don’t say which way you are using, it is difficult to be of more help.