DynamicAccounting.netYou, Me, and Dynamics GP

2012-08-06 · 2012

Weekly Dynamic: Line Numbers in SQL Server

Tips & Hidden FeaturesSQL & DataInstall, Upgrade & Admin

Archived post from 2012. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.

Many of you know just enough SQL to get by. By definition that involves some trial and error to get things right. Inevitably one of your Select statements will fail and SQL will give you some hints about what’s wrong including a line number.

But how do figure out what line is what? Do line numbers include spaces? There is a line number listed in the bottom right but even that is a pain to use.

In SQL Server Management Studio you can turn on line numbers with Tools | Options, expand Text Editor, Expand Transact-SQL, select General and check Line Numbers under Display.

Original article: https://www.mssqltips.com/sqlservertip/2542/display-line-numbers-in-a-sql-server-management-studio-query-window/