Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Find out exact line number of error message

Author  Topic 

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2009-10-23 : 10:26:25
When run SQL statement in query window, error message will display like below:

Msg 107, Level 16, State 2, Line 455

If you follow the line number 455 or double click error message, you never find out where is error.

How to find out error?

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-10-23 : 10:48:05
It's true that the line number doesn't always bring you to the exact spot of the problem. I can usually tell by the error message what the problem is. Especially if it includes some code specific detail. ie: incorrect syntax near 'SELET'.

Be One with the Optimizer
TG
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-10-23 : 12:51:51
usually this error has message like
The column prefix XXXXX does not match with a table name or alias name used in the query.

so it seems like you're using wrong alias for one or more columns
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2009-10-23 : 12:55:29
post the query

<><><><><><><><><><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -