0
I am trying to do the following Inner Join but am getting error:
FROM keyword not found where expected
select
e.num_exame as [exame],
a.num_amostra as [amostra],
e.data_hora_exame as [exame],
a.tipo_amostra as [amostra]
from exame as e
inner join amostra as a on e.num_exame = a.num_exame
group by e.num_exame, a.num_amostra, e.data_hora_exame, a.tipo_amostra
where upper (situacao_amostra) like upper ('%descartada%');
What is wrong?
What is that? Mysql, SQL Server, Oracle, Postgres?
– Jéf Bueno
I do not see any error except some particularity of the SQL dialect used in your DBMS, which you did not inform what it is. A curiosity: what is the reason for this clause
GROUP BY
if you do not use any aggregation function?– anonimo
It’s Oracle. I tried to comment group by but gives the same error...
– Thiago Tresca
Are you sure of these brackets, the alias would not be in quotes (e.g.: "exam")?
– anonimo
I tried trading for quotes and gave error: SQL command was not finished correctly
– Thiago Tresca