Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
sql_server 217
t-sql 211
tsql 116
sqlserver 96
BRH 78
#SQLServer 66
#TSQL 56
SQL Server 34
function 11
SSMS 9

Archive · View All
August 2007 17
August 2010 8
June 2012 7
June 2011 7
November 2007 7
August 2012 6
May 2012 6
November 2011 6
August 2011 6
October 2011 6

Madhivanan's TSQL Blog

Preserving format of procedure when using sp_helptext

Mar 21 2012 1:15AM by Madhivanan   

Often peple ask this question in the forum. "I created a procedure with proper alignment. But when I wanted to alter the procedure, result of sp_helptext did not keep the original alignment. How do I keep the original format?"

Well. One answer is to make use of Script Stored Procedure --> ALTER TO option from Management Studio. If you want to use sp_helptext system procedure to view and alter, set the result mode of the query window to Text (Press CTRL+T). The text result mode will keep the original alignment

Consider this simple procedure

create procedure test
as
	select 
		name,create_date
	from 
		sys.objects

Now set the result mode to Text and run this

EXEC sp_helptext test

The result will have the origninal formatting with proper alignment. So you need to aware of this when using sp_helptext system proceudre

Tags: t-sql, sql_server, sqlserver, tsql, sp_helptext,


Madhivanan
3 · 40% · 12958
1 Readers Learned from this post
kingkong0924 Learned from this post on 3/28/2012 8:21:00 PM
Profile
7
 
0
Lifesaver
 
 
1
Learned
 
0
Incorrect



Submit

3  Comments  

  • You can also query sys.sql_modules, instead of using sp_helptext

    commented on Mar 31 2012 2:25PM
    Marc Jellinek
    95 · 2% · 586
  • Hi Marc will you please give example for your sys.sqlmodules I am using SQL 2008 R2 & failed to find sys.sqlmodules or way to execute it to retrieve stored procedure text

    commented on Apr 2 2012 6:09AM
    Anand Bohra
    599 · 0% · 60
  • @Anand:

    http://msdn.microsoft.com/en-us/library/ms175081(v=sql.105).aspx

    SELECT [definition] from [sys].[sqlmodules] [sm] WHERE [sm].[objectid] = OBJECT_ID(N'foo')

    commented on Apr 2 2012 7:10AM
    Marc Jellinek
    95 · 2% · 586

Your Comment


Sign Up or Login to post a comment.

"Preserving format of procedure when using sp_helptext" rated 5 out of 5 by 7 readers
Preserving format of procedure when using sp_helptext , 5.0 out of 5 based on 7 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]