Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Query problem when switching from Access to MS SQL

$
0
0

I have this query which worked great in Access

 

 

SELECT e.wall +l.wall As wall2yr, e.lall +l.lall As lall2yr, l.TEAMID, l.TEAMNAME, l.GY AS LaterGY, l.finalrating AS LaterFinalRating, e.finalrating AS EarlyFinalRating, e.GY AS EarlyGY, LaterFinalRating+EarlyFinalRating  AS twoyear FROM TEAMSEASONRATINGINFO AS e INNER JOIN TEAMSEASONRATINGINFO AS l ON l.teamID = e.TeamID AND l.GY = e.GY+1 WHERE l.GY =#url.GY# AND e.finalrating > 0

AND l.DIVISION = #url.DIVISION#

ORDER BY e.finalrating+ l.finalrating DESC

 

Now I have switched to MS SQL and I am geting this error

 

[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'LaterFinalRating'.    

 

 

Is there something different the way MSSQL handles INNER JOINS or aliases?       


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>