BlakeMcKenna
asked on
Syntax Error in SQL Statement?
Could someone please tell me where the syntax error is in the SQL Statement? I've attached the statement as an image from SSMS. All the fields are correct as well as the joins. If I replace the @unitType_ID with a valid number and run it...it works fine! I know there is a line underneath the "scaleFactor" column, however, that field does exist.
Screenshot.JPG
Screenshot.JPG
In the lower window double-click on the error, and tell us what line the cursor jumps to. That's the error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're not showing enough in that picture. Is there an END beneath the end of that query? What's above the CREATE statement?
5th line in SELECT...
scaleFactor As 'Scale Factor'
What table is it from. Do you have this field in more than one table? Try it with its table alias letter. Either it is in more than one table or it doesn't exist at all (or has typo).
scaleFactor As 'Scale Factor'
What table is it from. Do you have this field in more than one table? Try it with its table alias letter. Either it is in more than one table or it doesn't exist at all (or has typo).
ASKER
Jim,
It was missing the END statement! Geez...I didn't even see that!
Thanks!
It was missing the END statement! Geez...I didn't even see that!
Thanks!