Msg 156, Level 15, State 1, Line 21 Incorrect syntax near the keyword 'FROM'.

Michael 20 Reputation points
2024-01-15T06:40:22.69+00:00

User's image

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,435 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 119.6K Reputation points
    2024-01-15T06:47:45.2633333+00:00

    Try to remove the unneeded ',':

    SELECT [location], [date], total_cases, total_deaths, (CAST (total_cases AS float)/CAST (total_deaths AS float))*100 AS DeathPercentage
    FROM PortfolioProject..coviddeaths$
    ORDER BY [location], [date]
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.