From time to time it's easy to use computed column as a subquery in view instead of join another one table.
In this case productivity of view can be significantly increased if to the subquery will be added filter for partition and dataareaid.
Also I've created an index for LedgerJournalTrans, for 3 fields:
JournalNum
Invoice
Voucher (included)
I was wondered, how the index looks in SQL like:
PHP код:
CREATE NONCLUSTERED INDEX [I_212GOA_JOURVOUCHERINVIDX]