Hi All
After reading Amit Bansal & AmitK’s tips about SSMS, thought of sharing the tip about enabling line numbers in SSMS query window.
In a day to day life many of you face the error message like this,
From the error message it clearly indicates, error at line number 28. If you enable line number for the query window you can easily go to particular line number.
For SQL Server 2008:
In the SSMS go to Tools Menu-> Options. This brings up the below Options window & Select Text Editor from the Left hand side and traverse to “Transact-SQL” then enable the Line Number option from Display section and click OK.
For SQL Server 2005:
In the SSMS go to Tools Menu -> Options. This brings up the below Options window & Select Text Editor from the Left hand side and traverse to “Plain Text” then enable the Line Number option from Display section and click OK.
Now you can see the line numbers in the left hand side of your query window 🙂
Another bonus tip…
You can use Ctrl + G to go to particular line number
Thanks for reading & I hope this helps!
Regards
Meganathan Kanagaraj
Like us on FaceBook | Follow us on Twitter
Join the fastest growing SQL Server group on FaceBook
Nice Mega !
Mega–>The other way to go to direct line No. is double click the error message it will take you to that line which causes the error..
I was going to say DoubleClick on the error message, but Sumit beat me to it, I see! But this doesn’t always work – sometimes it takes you to the Select at the very beginning of the code, so I shall certainly be using Ctrl G
slightly off topic however if possible really handy for readers.
Do you know what the hot keys is to close the result grid once viewed results so one can continue tweaking their T-SQL?
Thanks for the tip.
This is realy one i can use