I have two tables: ACCOUNTS and TRANSACTIONS and I need to produce a cursor
showing comparative totals for the last two years.
I know how to do a sql to get the totals of transactions for last year, and
the totals of transactions for this year, for each account. However I can't
work out how to join them, because there are some accounts that will have no
transactions against them for last year, some that will only have
transactions against them for last year, and some accounts that will have
transactions in both years.
Is creating two cursors, one for each year, and then attempting to join them
the best way, or is there an easier way?
Many thanks
Stephen