How can I fix this syntax error in my SQL View from Microsoft Access?

Jean C. Melendez 0 Reputation points
2024-06-06T14:43:46.38+00:00

Screenshot (14)

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,017 questions
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
883 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. LiHongMSFT-4306 28,121 Reputation points
    2024-06-07T01:55:34.5366667+00:00

    Hi @Jean C. Melendez

    Seems that you missed the ( ) when using AVG function.

    See: AVG (Transact-SQL)

    Also, modify line 2 from FROM [Customer Table] to FROM [Expenses Table].

    Best regards,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    1 person found this answer helpful.
    0 comments No comments

  2. Viorel 118.2K Reputation points
    2024-06-06T15:09:26.9333333+00:00

    To fix this particular error, try to use parentheses: AVG([Expense Table].ExpensesIncurred) (2 places).

    Then you can focus on other issues.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.