November 18, 2009 at 9:05 am
Getting an error I can't figure out :
Select value
FROM
[ssds_core_msphxx.privatebank.com\core].msphxx.DBO.LN_ACCT LN (NOLOCK)
INNER JOIN [ssds_core_msphxx.privatebank.com\core].msphxx.DBO.ln_user_def_val LU (NOLOCK)
ON LN.ACCT_NO = LU.ACCT_NO --AND LN.CLASS_CODE = LU.CLASS_CODE
where user_defined_id in (26) AS 'CLASSIFICATION'
Incorrect syntax near the keyword 'AS'.
November 18, 2009 at 9:09 am
figured it out...thanks guys
November 19, 2009 at 6:39 am
For anyone who may stumble upon this thread and wonder what the solution is, the error is in the WHERE clause.
where user_defined_id in (26) AS 'CLASSIFICATION'
should be
where user_defined_id in (26)
Because you cannot create an alias "AS 'CLASSIFICATION" anywhere but the SELECT list and aliasing tables in the FROM clause.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply