How to print query including line number in SMS?

  • How to print query including line number in SMS? Line number is display but missing in printing.

  • adonetok (11/10/2010)


    How to print query including line number in SMS? Line number is display but missing in printing.

    hi

    Try with Row_number() it will give you the line number in your case

    eg:

    Select ROW_NUMBER()over(ORDER BY name),* from sys.sysobjects

    Thanks

    Parthi

    Thanks
    Parthi

  • Do you mean SSMS?

    Can you show an example? Are you asking for a line number in the code or in the results?

  • Sorry, it is in SSMS. (SQL server management studio)

    I want to print out line number with content in a store procedure.

  • Do you need the line number of the code (the query), or of the data (the results of the query)?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Please show an example. It is not clear what you mean.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply