My background is Oracle and SQL Server but I am now using Sybase and the SQL tool provided is SQL Advantage. For some reason I cannot write joins in the new ANSI standard? I can’t see any problems with my syntax.
This works,
select b.el1,b.curcode
from oas_grplist g, oas_balance b
where g.cmpcode=b.cmpcode
and b.el1=g.code
But when running the equivalent,
select b.el1,b.curcode
from oas_grplist g
join oas_balance b on g.cmpcode=b.cmpcode
and b.el1=g.code
I get the error
Server Message: Number 102, Severity 15
Line 3:
Incorrect syntax near 'join'.
Are there limitations in Sybase or SQL Advantage? Any help would be much appreciated.
This works,
select b.el1,b.curcode
from oas_grplist g, oas_balance b
where g.cmpcode=b.cmpcode
and b.el1=g.code
But when running the equivalent,
select b.el1,b.curcode
from oas_grplist g
join oas_balance b on g.cmpcode=b.cmpcode
and b.el1=g.code
I get the error
Server Message: Number 102, Severity 15
Line 3:
Incorrect syntax near 'join'.
Are there limitations in Sybase or SQL Advantage? Any help would be much appreciated.