Hi
In Access, with both FE and BE in Access, this query works:
The purpose of the query is to show records where [BF] ("BestBefore date") is < 100 (days)
SELECT [Grunddata Maltsorter].Namn, [BF]-Date() AS [Dagar kvar] FROM [Grunddata Maltsorter] INNER JOIN [Inleverans insatsvaror rader Malt] ON [Grunddata Maltsorter].[Malt nr] = [Inleverans insatsvaror rader Malt].[Malt nr] GROUP BY [Grunddata Maltsorter].Namn, [BF]-Date() HAVING ((([BF]-Date())<100));
But after migrating to SQL server it generates an error pointing to Datetime2
I guess datetime2 is more complex than a simple integer as 100.
Whats the right syntax, working with SQL Server and also with an Access database?
Best // Peter Forss Stockholm and Sigtuna GMT +1.00