R
Raphaël Désalbres
Hello,
The following query works fine on SQL Server...
SELECT TOP 100 PERCENT D.IDDiary as 'N',D.[Date] as 'Date',Debt.[Name] as
'Debt Account', Credit.[Name] as 'Credit Account', D.Historic as
'Historic',D.Value as 'Value'
FROM Diary D
INNER JOIN Accounts Debt
ON Debt.IDAccounts=D.IDAccountDeb
INNER JOIN Accounts Credit
ON Credit.IDAccounts=D.IDAccountCred
INNER JOIN AccountTypes ADebt
ON ADebt.IDAccountTypes=Debt.IDAccountTypes
INNER JOIN AccountTypes ACred
ON ACred.IDAccountTypes=ACred.IDAccountTypes
GROUP BY D.IDDiary,Debt.[Name],Credit.[Name], D.Historic,
D.[Date],D.[Value]
ORDER BY D.IDDiary
But in Access it doesn't, as Access seems not to accept table aliases...
How can I do to solve this problem?
Any help would be appreciated,
Thanks,
Raphaël.
The following query works fine on SQL Server...
SELECT TOP 100 PERCENT D.IDDiary as 'N',D.[Date] as 'Date',Debt.[Name] as
'Debt Account', Credit.[Name] as 'Credit Account', D.Historic as
'Historic',D.Value as 'Value'
FROM Diary D
INNER JOIN Accounts Debt
ON Debt.IDAccounts=D.IDAccountDeb
INNER JOIN Accounts Credit
ON Credit.IDAccounts=D.IDAccountCred
INNER JOIN AccountTypes ADebt
ON ADebt.IDAccountTypes=Debt.IDAccountTypes
INNER JOIN AccountTypes ACred
ON ACred.IDAccountTypes=ACred.IDAccountTypes
GROUP BY D.IDDiary,Debt.[Name],Credit.[Name], D.Historic,
D.[Date],D.[Value]
ORDER BY D.IDDiary
But in Access it doesn't, as Access seems not to accept table aliases...
How can I do to solve this problem?
Any help would be appreciated,
Thanks,
Raphaël.