Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sybase (SQL Advantage) Join syntax

Status
Not open for further replies.

robz2009

Programmer
Apr 20, 2009
41
GB
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.
 
Maybe you a using an ancient Sybase server
ansi join syntax has been supported since ASE 12.0
What do you get from
select @@version
 
Bingo, that looks like the problem,

Adaptive Server Enterprise/11.9.2.5/1250/P/SWR 9894 ESD 4/RS6000/AIX 4.2.1/FBO/Thu Nov 29 02:03:54 2001

Thank you very much for the info, looks like I'll have to do it old school.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top