Invalid transactions

Page 1 of 1
7 posts
Invalid transactions

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
This report should be always empty.
If not there are some problems in DB and it should be fixed.
Invalid Transactions.png
(11.49 KiB) Downloaded 2508 times

Code: Select all
select c.transid, c.transdate, c.notes
    , 'ERROR' as Account
    , 'OK' as category
    ,  p.PayeeName as Payee
    from checkingaccount_v1 c
    inner join payee_v1 p on p.payeeid=c.payeeid
    where c.accountid not in (select accountid from accountlist_v1)
union all
select c.transid, c.transdate, c.notes
    , 'ERROR' as Account
    , 'OK' as category
    ,  '' as Payee
    from checkingaccount_v1 c
    where c.transcode ='Transfer' and c.toaccountid not in (select accountid from accountlist_v1)
union all
select c.transid, c.transdate, c.notes
    , a.AccountName
    , 'OK'
    ,  'ERROR'
    from checkingaccount_v1 c
      inner join accountlist_v1 a on a.accountid=c.accountid
    where c.payeeid not in (select payeeid from payee_v1) and transcode!='Transfer'
union all
select c.transid, c.transdate, c.notes
     , a.AccountName
    , 'ERROR'
    ,  p.PayeeName
    from checkingaccount_v1 c
      inner join payee_v1 p on p.payeeid=c.payeeid
      inner join accountlist_v1 a on a.accountid=c.accountid
    where c.categid=-1 and c.transid not in (select transid from splittransactions_v1)
union all
select c.transid, c.transdate, c.notes
     , a.AccountName
    , 'ERROR'
    ,  p.PayeeName
    from checkingaccount_v1 c
      inner join payee_v1 p on p.payeeid=c.payeeid
      inner join accountlist_v1 a on a.accountid=c.accountid
    where c.categid > 0 and c.categid not in (select categid from category_v1)
union all
select c.transid, c.transdate, c.notes
     , a.AccountName
    , 'ERROR'
    ,  p.PayeeName
    from checkingaccount_v1 c
      inner join payee_v1 p on p.payeeid=c.payeeid
      inner join accountlist_v1 a on a.accountid=c.accountid
    where c.categid > 0 and c.subcategid > 0 and c.subcategid not in (select subcategid from subcategory_v1)

Attachments
Invalid Transactions.grm
(1.91 KiB) Downloaded 363 times
Re: Invalid transactions

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
DB with invalid transactions sample
Attachments
test_invalid_transaction.mmb
(188 KiB) Downloaded 400 times
Re: Invalid transactions

miki
Super MMEX User

Posts: 23
Joined: Wed Jul 11, 2012 9:50 am
Location: IT
I have 3687 operations and 0 error ;) ... this report is empty :!:
MMEX v1.2.7 x64 [portable mode] / Windows 10 1703 Home x64
Re: Invalid transactions

msjpham
New MMEX User

Posts: 5
Joined: Thu Oct 02, 2014 12:51 pm
I ran the report and the results were empty and I am still getting the error message.
Re: Invalid transactions

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
msjpham wrote:I ran the report and the results were empty and I am still getting the error message.
what kind of message?
Re: Invalid transactions

guanlisheng
MMEX Developer

Posts: 279
Joined: Tue Dec 20, 2011 11:58 pm
Location: China
Nikolay, would we post this report to Github ?
Re: Invalid transactions

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
Page 1 of 1
Who is online

Users browsing this forum: No registered users and 2 guests

cron