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.
13,183 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.
848 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 114K 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

  2. LiHongMSFT-4306 25,326 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".

    0 comments No comments