<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Stored Procedure to display code (text) of Stored Procedure, Trigger, View or Object</title>
	<atom:link href="http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:36:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Durai Vishal</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-211550</link>
		<dc:creator><![CDATA[Durai Vishal]]></dc:creator>
		<pubDate>Mon, 05 Dec 2011 19:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-211550</guid>
		<description><![CDATA[Hi Pinal

I have restored SQL Server 2008 Database to Other New DB Server and In the new server - I want to create around 800 Orphaned windows users,  Please let me know any short cut method to created Windows Login from the Users list of Restored database\Security\Users

select u.name from master..syslogins l right join 
    sysusers u on l.sid = u.sid 
    where l.sid is null and issqlrole  1 and isapprole  1   
    and (u.name  &#039;INFORMATION_SCHEMA&#039; and u.name  &#039;guest&#039;  
    and u.name  &#039;system_function_schema&#039;)]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal</p>
<p>I have restored SQL Server 2008 Database to Other New DB Server and In the new server &#8211; I want to create around 800 Orphaned windows users,  Please let me know any short cut method to created Windows Login from the Users list of Restored database\Security\Users</p>
<p>select u.name from master..syslogins l right join<br />
    sysusers u on l.sid = u.sid<br />
    where l.sid is null and issqlrole  1 and isapprole  1<br />
    and (u.name  &#8216;INFORMATION_SCHEMA&#8217; and u.name  &#8216;guest&#8217;<br />
    and u.name  &#8216;system_function_schema&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jm</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-192120</link>
		<dc:creator><![CDATA[jm]]></dc:creator>
		<pubDate>Thu, 10 Nov 2011 07:17:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-192120</guid>
		<description><![CDATA[How to view, all users&#039; name of a database, in ms sql server 7 ?]]></description>
		<content:encoded><![CDATA[<p>How to view, all users&#8217; name of a database, in ms sql server 7 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-186425</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 01 Nov 2011 14:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-186425</guid>
		<description><![CDATA[Why do you want not to use a query analyser for this. It is easy to view definition of a stored procedure using query analyser]]></description>
		<content:encoded><![CDATA[<p>Why do you want not to use a query analyser for this. It is easy to view definition of a stored procedure using query analyser</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mithun Pal</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-186025</link>
		<dc:creator><![CDATA[Mithun Pal]]></dc:creator>
		<pubDate>Mon, 31 Oct 2011 17:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-186025</guid>
		<description><![CDATA[How to view the stored procedure definition other than query in Query analyzer.Do you other other options .Example right click on store procedure goto ....etc like]]></description>
		<content:encoded><![CDATA[<p>How to view the stored procedure definition other than query in Query analyzer.Do you other other options .Example right click on store procedure goto &#8230;.etc like</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajkumar</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-149756</link>
		<dc:creator><![CDATA[rajkumar]]></dc:creator>
		<pubDate>Thu, 21 Jul 2011 09:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-149756</guid>
		<description><![CDATA[thanks very useful information]]></description>
		<content:encoded><![CDATA[<p>thanks very useful information</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gangadhar Yelubandi</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-149079</link>
		<dc:creator><![CDATA[Gangadhar Yelubandi]]></dc:creator>
		<pubDate>Mon, 18 Jul 2011 07:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-149079</guid>
		<description><![CDATA[Thanks,,,it working]]></description>
		<content:encoded><![CDATA[<p>Thanks,,,it working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pradeep</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-136427</link>
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Tue, 24 May 2011 16:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-136427</guid>
		<description><![CDATA[Thanks. Exactly what is was looking for.]]></description>
		<content:encoded><![CDATA[<p>Thanks. Exactly what is was looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinesh</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-136393</link>
		<dc:creator><![CDATA[Dinesh]]></dc:creator>
		<pubDate>Tue, 24 May 2011 12:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-136393</guid>
		<description><![CDATA[thanks]]></description>
		<content:encoded><![CDATA[<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: narender1903</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-134778</link>
		<dc:creator><![CDATA[narender1903]]></dc:creator>
		<pubDate>Tue, 17 May 2011 07:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-134778</guid>
		<description><![CDATA[i want the name of procedure which is going to be deleted in a table how this can achieve]]></description>
		<content:encoded><![CDATA[<p>i want the name of procedure which is going to be deleted in a table how this can achieve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: narender1903</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-134777</link>
		<dc:creator><![CDATA[narender1903]]></dc:creator>
		<pubDate>Tue, 17 May 2011 07:50:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-134777</guid>
		<description><![CDATA[sp_helptext is not showing the defination please revert thanks in advance]]></description>
		<content:encoded><![CDATA[<p>sp_helptext is not showing the defination please revert thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-124355</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 22 Mar 2011 07:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-124355</guid>
		<description><![CDATA[What is the actual problem with the view?]]></description>
		<content:encoded><![CDATA[<p>What is the actual problem with the view?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramalingam</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-124234</link>
		<dc:creator><![CDATA[Ramalingam]]></dc:creator>
		<pubDate>Mon, 21 Mar 2011 09:29:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-124234</guid>
		<description><![CDATA[ALTER VIEW [dbo].[vwProviderUtilization]
AS
SELECT 
dbo.UsageHourseMinutes(O.AllocationStartDate, ISNULL(O.ActualReleaseDate,GETDATE())) AS Utilized_Time


this my view, if ActualReleasedate is null then am taking the getdate, if user select the date before the Getdate the utlizied time will be calculated on the getdate it rong how to solve the problem not in storeprocedure i need the result in veiw..]]></description>
		<content:encoded><![CDATA[<p>ALTER VIEW [dbo].[vwProviderUtilization]<br />
AS<br />
SELECT<br />
dbo.UsageHourseMinutes(O.AllocationStartDate, ISNULL(O.ActualReleaseDate,GETDATE())) AS Utilized_Time</p>
<p>this my view, if ActualReleasedate is null then am taking the getdate, if user select the date before the Getdate the utlizied time will be calculated on the getdate it rong how to solve the problem not in storeprocedure i need the result in veiw..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-122849</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 11 Mar 2011 10:59:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-122849</guid>
		<description><![CDATA[exec sp_helptext &#039;procedure_name&#039;]]></description>
		<content:encoded><![CDATA[<p>exec sp_helptext &#8216;procedure_name&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ArunPandian</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-122708</link>
		<dc:creator><![CDATA[ArunPandian]]></dc:creator>
		<pubDate>Thu, 10 Mar 2011 17:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-122708</guid>
		<description><![CDATA[Hello Sir,
         I need definition  of  stored proc

by arun]]></description>
		<content:encoded><![CDATA[<p>Hello Sir,<br />
         I need definition  of  stored proc</p>
<p>by arun</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-121664</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 03 Mar 2011 08:51:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-121664</guid>
		<description><![CDATA[You need to set the result mode to text (press ctrl+T) and execute sp_helptext spname]]></description>
		<content:encoded><![CDATA[<p>You need to set the result mode to text (press ctrl+T) and execute sp_helptext spname</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-121663</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 03 Mar 2011 08:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-121663</guid>
		<description><![CDATA[You cannot display images in the Query analyser. So omit that column when querying. Also you need to use front end application to display the images]]></description>
		<content:encoded><![CDATA[<p>You cannot display images in the Query analyser. So omit that column when querying. Also you need to use front end application to display the images</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vipul Vankadiya</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-120782</link>
		<dc:creator><![CDATA[vipul Vankadiya]]></dc:creator>
		<pubDate>Sat, 26 Feb 2011 11:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-120782</guid>
		<description><![CDATA[I Have One Table [BIODATA] In Which One Field Like [Emp_Photo] With image Datatype And I Store Employee Image As Binary In This Table
In This Table Have About 2000 Employee Record With Image

When I Write [Select * From Biodata] It Will Take Large Amount Of Time For Complete Execution

I Write [Select Emp_Code,Emp_Name..... From Biodata] Except [Emp_Photo] Field
In Few Second It Will Execut

So.. Any Solution For Query With [Image] field Can Be Faster]]></description>
		<content:encoded><![CDATA[<p>I Have One Table [BIODATA] In Which One Field Like [Emp_Photo] With image Datatype And I Store Employee Image As Binary In This Table<br />
In This Table Have About 2000 Employee Record With Image</p>
<p>When I Write [Select * From Biodata] It Will Take Large Amount Of Time For Complete Execution</p>
<p>I Write [Select Emp_Code,Emp_Name..... From Biodata] Except [Emp_Photo] Field<br />
In Few Second It Will Execut</p>
<p>So.. Any Solution For Query With [Image] field Can Be Faster</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vipul Vankadiya</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-120780</link>
		<dc:creator><![CDATA[vipul Vankadiya]]></dc:creator>
		<pubDate>Sat, 26 Feb 2011 11:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-120780</guid>
		<description><![CDATA[I have written a storeprocedure in a well formatted manner, and after saving I try to open the same procedure using the &quot;sp_helptext &quot;. Which actually opens the procedure but formatting is destroyed. 
So...What Is Solution For That]]></description>
		<content:encoded><![CDATA[<p>I have written a storeprocedure in a well formatted manner, and after saving I try to open the same procedure using the &#8220;sp_helptext &#8220;. Which actually opens the procedure but formatting is destroyed.<br />
So&#8230;What Is Solution For That</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asim</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-111012</link>
		<dc:creator><![CDATA[asim]]></dc:creator>
		<pubDate>Fri, 14 Jan 2011 19:06:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-111012</guid>
		<description><![CDATA[ecellent]]></description>
		<content:encoded><![CDATA[<p>ecellent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asim</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-111011</link>
		<dc:creator><![CDATA[asim]]></dc:creator>
		<pubDate>Fri, 14 Jan 2011 19:06:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-111011</guid>
		<description><![CDATA[Excellent site ;its really very help ful]]></description>
		<content:encoded><![CDATA[<p>Excellent site ;its really very help ful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: very good</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-74361</link>
		<dc:creator><![CDATA[very good]]></dc:creator>
		<pubDate>Wed, 02 Jun 2010 10:09:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-74361</guid>
		<description><![CDATA[your description is very good always]]></description>
		<content:encoded><![CDATA[<p>your description is very good always</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ana</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-72008</link>
		<dc:creator><![CDATA[ana]]></dc:creator>
		<pubDate>Fri, 21 May 2010 08:37:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-72008</guid>
		<description><![CDATA[hi, i want to display data in form.i have used labels and textboxes in forms and want to retreive data from my database to get data in the textboxes according to userid.i m able to reteive userid in page but now i m not gettin g how to get values in my textboxes from database. im using ASP.net 3.5 with C# and Sql server 2005.
kindly help me.]]></description>
		<content:encoded><![CDATA[<p>hi, i want to display data in form.i have used labels and textboxes in forms and want to retreive data from my database to get data in the textboxes according to userid.i m able to reteive userid in page but now i m not gettin g how to get values in my textboxes from database. im using ASP.net 3.5 with C# and Sql server 2005.<br />
kindly help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajay</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-69782</link>
		<dc:creator><![CDATA[Ajay]]></dc:creator>
		<pubDate>Sat, 08 May 2010 11:09:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-69782</guid>
		<description><![CDATA[Sir,
        In SQL 2000 ,how can we get the text of all Stored Procedure together ? In SQL 2005, I was able to get it from this code ,but there are some structures which are not present in SQL 2000 like (select * from sys.sql_modules m )

The code for SQL 2005

ALTER PROCEDURE [dbo].[usp_SearchStoredProcedure_Generate_ViewSPText] 
@SearchTerm VARCHAR(1000) 
AS
DECLARE @SQL NVARCHAR(MAX) 
SET @SQL = &#039;&#039;
SELECT @SQL = @SQL + &#039; EXEC sp_helptext &#039;&#039;&#039; + s.name+&#039;.&#039;+OBJECT_NAME(m.object_id)+&#039;&#039;&#039;&#039;
FROM sys.sql_modules m 
INNER JOIN sys.objects o ON o.object_id = m.object_id 
INNER JOIN sys.schemas s ON s.schema_id = o.schema_id 
WHERE Definition LIKE &#039;%&#039;+@SearchTerm+&#039;%&#039; AND 
OBJECTPROPERTY(m.object_id, &#039;IsProcedure&#039;) = 1; 
EXEC sp_executesql @SQL 

--------------------------------------------


This is for calling them in single column

-- exec storedprocedureexecution

ALTER procedure [dbo].[storedprocedureexecution]

as
begin

create table #temp
(
SPName varchar(max)

)

--insert into #temp exec dbo.usp_SearchStoredProcedure_GenerateHelpText &#039;&#039;
insert into #temp  exec dbo.usp_SearchStoredProcedure_Generate_ViewSPText  &#039;&#039;

select * from #temp

end]]></description>
		<content:encoded><![CDATA[<p>Sir,<br />
        In SQL 2000 ,how can we get the text of all Stored Procedure together ? In SQL 2005, I was able to get it from this code ,but there are some structures which are not present in SQL 2000 like (select * from sys.sql_modules m )</p>
<p>The code for SQL 2005</p>
<p>ALTER PROCEDURE [dbo].[usp_SearchStoredProcedure_Generate_ViewSPText]<br />
@SearchTerm VARCHAR(1000)<br />
AS<br />
DECLARE @SQL NVARCHAR(MAX)<br />
SET @SQL = &#8221;<br />
SELECT @SQL = @SQL + &#8216; EXEC sp_helptext &#8221;&#8217; + s.name+&#8217;.'+OBJECT_NAME(m.object_id)+&#8221;&#8221;<br />
FROM sys.sql_modules m<br />
INNER JOIN sys.objects o ON o.object_id = m.object_id<br />
INNER JOIN sys.schemas s ON s.schema_id = o.schema_id<br />
WHERE Definition LIKE &#8216;%&#8217;+@SearchTerm+&#8217;%&#8217; AND<br />
OBJECTPROPERTY(m.object_id, &#8216;IsProcedure&#8217;) = 1;<br />
EXEC sp_executesql @SQL </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>This is for calling them in single column</p>
<p>&#8211; exec storedprocedureexecution</p>
<p>ALTER procedure [dbo].[storedprocedureexecution]</p>
<p>as<br />
begin</p>
<p>create table #temp<br />
(<br />
SPName varchar(max)</p>
<p>)</p>
<p>&#8211;insert into #temp exec dbo.usp_SearchStoredProcedure_GenerateHelpText &#8221;<br />
insert into #temp  exec dbo.usp_SearchStoredProcedure_Generate_ViewSPText  &#8221;</p>
<p>select * from #temp</p>
<p>end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-67960</link>
		<dc:creator><![CDATA[Amit]]></dc:creator>
		<pubDate>Fri, 30 Apr 2010 06:07:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-67960</guid>
		<description><![CDATA[Hello Masters...How i update table1 when i delete data from table2 through Stored procedure.]]></description>
		<content:encoded><![CDATA[<p>Hello Masters&#8230;How i update table1 when i delete data from table2 through Stored procedure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: selva</title>
		<link>http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-64692</link>
		<dc:creator><![CDATA[selva]]></dc:creator>
		<pubDate>Wed, 07 Apr 2010 09:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/#comment-64692</guid>
		<description><![CDATA[Hi

i have upgraded sql 2008 from 2005, after upgraded i got many problem in reports,  the alignments  are not good and also page setup not correct,  please explain me why it is happening, and how to resolved this problem.

thanks

selva]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>i have upgraded sql 2008 from 2005, after upgraded i got many problem in reports,  the alignments  are not good and also page setup not correct,  please explain me why it is happening, and how to resolved this problem.</p>
<p>thanks</p>
<p>selva</p>
]]></content:encoded>
	</item>
</channel>
</rss>

