Skip to content
Advertisement

Error (ORA-00923: FROM keyword not found where expected)

    select 
      country_olympic_name, 
      SUM(part_gold) as 'Number of Gold Medals'
    From
      games.country,
      games.participation
   where
      participation.country_isocode = country.country_isocode
   group by
      country_olympic_name;

I have been getting the error ORA-00923: FROM keyword not found where expected and do not know why, please help

Advertisement

Answer

Identifiers need to be quoted with double quotes ("). Single quotes (') denote a character value (not a “name”).

Therefor you need to use:

SUM(part_gold) as "Number of Gold Medals"

More details in the manual:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement