I have the below table in MS Access.
Select Max(Day) As Day From Table Where Day < 432
Select Min(Day) As Day From Table Where Day > 432
You tried to execute a query that does not include the specified
expression 'ABC' as part of an aggregate function.
There's a couple of problems with your SQL. The error message occurs because you didn't add a
GROUP BY ABC clause to both the
You'll also get a circular reference as due to
MAX(DAY) as DAY - you need to change the
as Day to something else maybe
You'll probably (I did) get a error Syntax Error calling it
Table - pretty sure that's a reserved word.
Maybe this query will work better:
Select Top 1 Day, ABC From Table3 Where Day <= 913 ORDER BY Day Desc UNION ALL Select Top 1 Day, ABC From Table3 Where Day >= 913 ORDER BY Day Asc