The following query was working fine in MySQL:
SELECT
total,
status.nome
FROM status
INNER JOIN (SELECT count(*) AS total,
status_id
FROM [log]
WHERE evento_id = '21'
AND data BETWEEN '02/09/2013 00:00:00' AND '02/09/2013 23:59:59'
GROUP BY status_id) AS groupedTable
ON groupedTable.status_id = status.id;
but when I try to run it in Oracle, i get the following error message:
ORA-00903: invalid table name
If I change the query as:
SELECT
total, status.nome
FROM
status
INNER JOIN (
SELECT count(*) as total, status_id
FROM log
WHERE evento_id = '21'
AND data BETWEEN '02/09/2013 00:00:00' AND '02/09/2013 23:59:59'
GROUP BY status_id) AS groupedTable
ON groupedTable.status_id = status.id;
i get this error message instead:
ORA-00905: keyword not found
I think the problem is in the log
table but I am not able to convert it and make it work in Oracle. Can anybody please help me?