I
Irshad Alam
I have made query from 2 different table which works fine :
SELECT [Customer], "Address:- " & [Address] & " Telephone:- " &
[Telephone] & " Fax.:- " & [Fax] AS CustomerDetails
FROM [MachHist]
UNION SELECT [CoName], "TeleNo:- " & [TeleNo] & " FaxNo:- " & [FaxNo] & "
Email:- " & & " MobileNo:- " & [MobileNo] & " PostBox:- " &
[PostBox]
FROM [TeleDir];
But when I try add to Group By at the end , it produces error :
SELECT [Customer], "Address:- " & [Address] & " Telephone:- " &
[Telephone] & " Fax.:- " & [Fax] AS CustomerDetails
FROM [MachHist]
UNION SELECT [CoName], "TeleNo:- " & [TeleNo] & " FaxNo:- " & [FaxNo] & "
Email:- " & [Email] & " MobileNo:- " & [MobileNo] & " PostBox:- " &
[PostBox]
FROM [TeleDir]
GROUP BY Customer.MachHist, CoName.TeleDir;
It producess error of Specified Expression of Aggregate Function.
My Requirement is to group by the customer and CoName, so that there will no
duplicate.
Please advice.
Regards
Irshad
SELECT [Customer], "Address:- " & [Address] & " Telephone:- " &
[Telephone] & " Fax.:- " & [Fax] AS CustomerDetails
FROM [MachHist]
UNION SELECT [CoName], "TeleNo:- " & [TeleNo] & " FaxNo:- " & [FaxNo] & "
Email:- " & & " MobileNo:- " & [MobileNo] & " PostBox:- " &
[PostBox]
FROM [TeleDir];
But when I try add to Group By at the end , it produces error :
SELECT [Customer], "Address:- " & [Address] & " Telephone:- " &
[Telephone] & " Fax.:- " & [Fax] AS CustomerDetails
FROM [MachHist]
UNION SELECT [CoName], "TeleNo:- " & [TeleNo] & " FaxNo:- " & [FaxNo] & "
Email:- " & [Email] & " MobileNo:- " & [MobileNo] & " PostBox:- " &
[PostBox]
FROM [TeleDir]
GROUP BY Customer.MachHist, CoName.TeleDir;
It producess error of Specified Expression of Aggregate Function.
My Requirement is to group by the customer and CoName, so that there will no
duplicate.
Please advice.
Regards
Irshad