Hi Markus, Markus Klemm <markus at markusklemm.net> writes: > Raw Sourcecode below [...] Wouldn't something like this work: using dir_query = odb::query<directory>; dir_query q ("ORDER BY"); switch (column) { case added: q += dir_query::added; ... } switch (order) { case desc: q += "DESC"; ... } db.query (q); Boris