diff --git a/app/src/main/java/com/money/manager/ex/payee/PayeeListFragment.java b/app/src/main/java/com/money/manager/ex/payee/PayeeListFragment.java index 760bcc373..f4e98e19f 100644 --- a/app/src/main/java/com/money/manager/ex/payee/PayeeListFragment.java +++ b/app/src/main/java/com/money/manager/ex/payee/PayeeListFragment.java @@ -69,8 +69,8 @@ public class PayeeListFragment // private static final long MENU_ITEM_ADD = 1; private static final int ID_LOADER_PAYEE = 0; - private static final String SORT_BY_USAGE = "(SELECT COUNT(*) FROM CHECKINGACCOUNT_V1 WHERE PAYEEID = CHECKINGACCOUNT_V1.PAYEEID AND (CHECKINGACCOUNT_V1.DELETEDTIME IS NULL OR CHECKINGACCOUNT_V1.DELETEDTIME = '') ) DESC"; private static final String SORT_BY_NAME = "UPPER(" + Payee.PAYEENAME + ")"; + private static final String SORT_BY_USAGE = "(SELECT COUNT(*) FROM CHECKINGACCOUNT_V1 WHERE PAYEE_V1.PAYEEID = CHECKINGACCOUNT_V1.PAYEEID AND (CHECKINGACCOUNT_V1.DELETEDTIME IS NULL OR CHECKINGACCOUNT_V1.DELETEDTIME = '') ) DESC"; private Context mContext; private String mCurFilter; diff --git a/app/src/main/java/com/money/manager/ex/tag/TagListFragment.java b/app/src/main/java/com/money/manager/ex/tag/TagListFragment.java index baade529f..26c37d208 100644 --- a/app/src/main/java/com/money/manager/ex/tag/TagListFragment.java +++ b/app/src/main/java/com/money/manager/ex/tag/TagListFragment.java @@ -50,7 +50,7 @@ public class TagListFragment extends BaseListFragment private static final int ID_LOADER_TAG = 0; private static final String SORT_BY_NAME = "UPPER(" + Tag.TAGNAME + ")"; - private static final String SORT_BY_USAGE = "(SELECT COUNT(*) FROM TAGLINK_V1 WHERE TAGID = TAGLINK_V1.TAGID ) DESC"; + private static final String SORT_BY_USAGE = "(SELECT COUNT(*) FROM TAGLINK_V1 WHERE TAG_V1.TAGID = TAGLINK_V1.TAGID ) DESC"; private Context mContext; private String mCurFilter;