diff --git a/src/engine/sql/gncquery.c b/src/engine/sql/gncquery.c index 0a86ad9509..3c5314bab2 100644 --- a/src/engine/sql/gncquery.c +++ b/src/engine/sql/gncquery.c @@ -93,11 +93,11 @@ sql_sort_order (char *p, sort_type_t sort_type, gboolean increasing) case BY_STANDARD: if (TRUE == increasing) { - p = stpcpy (p, "gncTransaction.date_posted ASC, gncTransaction.num ASC, " - "gncTransaction.date_entered ASC, gncTransaction.description"); - } else { p = stpcpy (p, "gncTransaction.date_posted DESC, gncTransaction.num DESC, " "gncTransaction.date_entered DESC, gncTransaction.description"); + } else { + p = stpcpy (p, "gncTransaction.date_posted ASC, gncTransaction.num ASC, " + "gncTransaction.date_entered ASC, gncTransaction.description"); } break; case BY_DATE: @@ -168,11 +168,11 @@ sql_sort_order (char *p, sort_type_t sort_type, gboolean increasing) if (TRUE == increasing) { - p = stpcpy (p, " ASC "); + p = stpcpy (p, " DESC "); } else { - p = stpcpy (p, " DESC "); + p = stpcpy (p, " ASC "); } return p;