Hi,
Trying to find out whether below SQL Server - SQL style works in oracle.
On testing SQL in Oracle, it gave Error: Ora-00923 from keyword not found where expected
Is there another way to run above Oracle sql query as Subquery similar to SQL Server SQL?
Please help.
Ken
Trying to find out whether below SQL Server - SQL style works in oracle.
On testing SQL in Oracle, it gave Error: Ora-00923 from keyword not found where expected
Code:
SQL Server code:
Select aid, sum(amount)
from (
Select t.aid, t.isbn, amt = (t.price * r.royalty)
from table as t
inner join table2 as r on t.isbn=r.isbn
left join table3 as s on t.isbn=s.isbn ) as A
Group by aid
Code:
Oracle Code with eror:
Select DEPTNO, sum(sal), sum(IN_amt)
from (
Select e.DeptNO, e.sal as sal, IN_amt = (e.sal * .1)
from emp as e
) as A
Group by Deptno
Please help.
Ken