Unix Technical Forum

Script line number

This is a discussion on Script line number within the SQL Server forums, part of the Microsoft SQL Server category; --> When you get a server error message referring to a line number in a script, is there an easy ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:48 PM
Kerry
 
Posts: n/a
Default Script line number

When you get a server error message referring to a line number in a
script, is there an easy way to jump to the correct line? It's not
easy to count down in a big script or when there is a lot of white
space.

In WordPerfect we had a linenum macro that allowed you to enter the
line number and it would jump to the line using the same counting
method as the interpreter that generated the error message. Is there
something similar with TSQL, or another way?

Kerry
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:48 PM
Craig Kelly
 
Posts: n/a
Default Re: Script line number

"Kerry" <kerrytforums@hotmail.com> wrote:
> When you get a server error message referring to a line number in a
> script, is there an easy way to jump to the correct line? It's not
> easy to count down in a big script or when there is a lot of white
> space.
>
> In WordPerfect we had a linenum macro that allowed you to enter the
> line number and it would jump to the line using the same counting
> method as the interpreter that generated the error message. Is there
> something similar with TSQL, or another way?
>
> Kerry


Kerry,

That will depend on your editor... most editors (including Query Analyzer
with SQL Server 2000, Notepad in WinXP, and Visual Studio) have a function
for jumping to a specific line number. In most editors I've worked with on
Windows, it's usually ctrl-G

Craig


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 07:48 PM
Dan Guzman
 
Posts: n/a
Default Re: Script line number

In Query Analyzer, you can double-click on the error message in the
result pane to jump to the source line in question.

--
Hope this helps.

Dan Guzman
SQL Server MVP

-----------------------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index....partmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------

"Kerry" <kerrytforums@hotmail.com> wrote in message
news:6e61c2be.0311140759.25063405@posting.google.c om...
> When you get a server error message referring to a line number in a
> script, is there an easy way to jump to the correct line? It's not
> easy to count down in a big script or when there is a lot of white
> space.
>
> In WordPerfect we had a linenum macro that allowed you to enter the
> line number and it would jump to the line using the same counting
> method as the interpreter that generated the error message. Is there
> something similar with TSQL, or another way?
>
> Kerry



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com