hi.
this is the query:
select agn., ass. ,
SUM(ass.priceForSale) AS priceForSaleAll, COUNT(ass.priceForSale) AS priceForSaleCount,
SUM(ass.totalRooms) AS totalRoomsAll, COUNT(ass.totalRooms) AS totalRoomsCount,
DATEDIFF(ass.exclusiveFrom,ass.exclusiveUntil) as exclusiveAll
FROM tblAgentsOffices AS agn
inner join tblAssets AS ass on (agn.id=ass.regOfficeId) group by agn.id
im getting the error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(ass.exclusiveFrom,assexclusiveUntil) as exclusiveAll FROM
any idea y?
my version is 4.1.15, any other option to perform date diff in this version?
thanks a lot