Try this.
/* Assuming your table is called [Ledger] */
SELECT
[LedgerRoot].[LedgerId],
[LedgerRoot].[Description],
[LedgerParent].[ParentAccount],
[LedgerRoot].[Category],
[LedgerParent].[Description] AS [ParentDescription]
FROM [Ledger] AS [LedgerRoot]
INNER JOIN [Ledger] AS [LedgerParent]
ON [Ledger].[ParentAccount] = [LedgerParent].[LedgerId]
WHERE [Ledger].[Category] = 'ControlAC';
I.W Coetzer
No comments:
Post a Comment