Hi,
LedgerID DescriptionParentAccount Category
--------------------------------------------------------
1 Asset 0 Class
3 CurrentAsset1 Class
4 FixedAsset 1 Class
7 Cash 3 SubClass
8 Bank 4 SubClass
11 CashInHand 7 ControlAC
12 HSBC 8 ControlAC
2 Liability 0 Class
5 CurrentLiablity2 Class
6 LongLiablity2 Class
9 AccountPayable5SubClass
10 BankLoan 6 SubClass
13 SupplierRam9 ControlAC
14 CompanyOwe 10 ControlAC
I have a table like above, the 'ControlAC' is least one its has come from many subclass.
i need final query like below table, which means need to display only 'ControlAC' with 'ParentAccount' and 'ParentDescription' which from origin after the 'ParentAccount' as 0
LedgerID DescriptionParentAccount CategoryParentDescription
---------------------------------------------------------------------------------
7 CashInHand 3 ControlAC CurrentAsset
8 HSBC 4 ControlAC FixedAsset
13 SupplierRam5 ControlACCurrentLiablity
14 CompanyOwe 6 ControlAC LongLiablity
No comments:
Post a Comment