<?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; 2005 &#8211; Search Stored Procedure Code &#8211; Search Stored Procedure Text</title>
	<atom:link href="http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 20:36:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #007 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-393511</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #007 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 15 Dec 2012 01:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-393511</guid>
		<description><![CDATA[[...] do the same in SQL Server 2000 and SQL Server 2005. This is worth bookmarking blog post. There is an alternative way to do the same as well here is the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] do the same in SQL Server 2000 and SQL Server 2005. This is worth bookmarking blog post. There is an alternative way to do the same as well here is the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Beginning New Weekly Series &#8211; Memory Lane &#8211; #002 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-371914</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Beginning New Weekly Series &#8211; Memory Lane &#8211; #002 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 10 Nov 2012 01:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-371914</guid>
		<description><![CDATA[[...] Version 2: This is specific version which works with SQL Server 2005 and later version [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Version 2: This is specific version which works with SQL Server 2005 and later version [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GRACIAS</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-359481</link>
		<dc:creator><![CDATA[GRACIAS]]></dc:creator>
		<pubDate>Sat, 13 Oct 2012 15:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-359481</guid>
		<description><![CDATA[CREATE PROCEDURE [dbo].[SP_BUSCA_CONTENIDO_ALL_SPS] @BUSCAR NVARCHAR(800)
AS 
BEGIN
DECLARE @COMANDO AS NVARCHAR(800)
-- create temporary Result table to gather names and text
-- of the procedures in the DataBaseName database :
IF OBJECT_ID(&#039;tempdb..#Result&#039;)      IS NOT NULL   drop table  #Result
IF OBJECT_ID(&#039;tempdb..#ProcList&#039;)    IS NOT NULL   drop table  #ProcList
CREATE TABLE #Result
(TextField varchar(max), ProcName varchar(100))

-- create temporary ProcName table with the names of
-- all the procedures in the database [DataBaseName]:
CREATE TABLE #ProcList
(ID int IDENTITY, ProcName varchar(100))

-- populate the ProcName table with the procedure names:
INSERT #ProcList SELECT [name] from sys.procedures

-- get the number of procedures (to be used in the loop below):
DECLARE @NumberOfProcs int
SELECT @NumberOfProcs = COUNT(*) FROM sys.procedures

-- loop to populate the Result table:
DECLARE @i INT
SET @i = 1
DECLARE @ProcName varchar(100)
DECLARE @SQL varchar(2000)
WHILE @i &lt;= @NumberOfProcs
BEGIN
SELECT @ProcName = ProcName FROM #ProcList WHERE ID = @i
SET @SQL = &#039;INSERT INTO #Result (TextField) EXEC sp_helptext &#039; + @ProcName
EXEC (@SQL)
UPDATE #Result SET ProcName = @ProcName WHERE ProcName IS NULL
SET @i = @i + 1
END

-- Visualiza el resultado de la busqueda en una tabla
SET @COMANDO = &#039;SELECT * FROM #Result WHERE TextField LIKE &#039;+CHAR(39)+&#039;%&#039;+@BUSCAR+&#039;%&#039;+CHAR(39)
EXEC SP_EXECUTESQL @COMANDO

-- clean up
DROP TABLE #Result
DROP TABLE #ProcList

END]]></description>
		<content:encoded><![CDATA[<p>CREATE PROCEDURE [dbo].[SP_BUSCA_CONTENIDO_ALL_SPS] @BUSCAR NVARCHAR(800)<br />
AS<br />
BEGIN<br />
DECLARE @COMANDO AS NVARCHAR(800)<br />
&#8211; create temporary Result table to gather names and text<br />
&#8211; of the procedures in the DataBaseName database :<br />
IF OBJECT_ID(&#8216;tempdb..#Result&#8217;)      IS NOT NULL   drop table  #Result<br />
IF OBJECT_ID(&#8216;tempdb..#ProcList&#8217;)    IS NOT NULL   drop table  #ProcList<br />
CREATE TABLE #Result<br />
(TextField varchar(max), ProcName varchar(100))</p>
<p>&#8211; create temporary ProcName table with the names of<br />
&#8211; all the procedures in the database [DataBaseName]:<br />
CREATE TABLE #ProcList<br />
(ID int IDENTITY, ProcName varchar(100))</p>
<p>&#8211; populate the ProcName table with the procedure names:<br />
INSERT #ProcList SELECT [name] from sys.procedures</p>
<p>&#8211; get the number of procedures (to be used in the loop below):<br />
DECLARE @NumberOfProcs int<br />
SELECT @NumberOfProcs = COUNT(*) FROM sys.procedures</p>
<p>&#8211; loop to populate the Result table:<br />
DECLARE @i INT<br />
SET @i = 1<br />
DECLARE @ProcName varchar(100)<br />
DECLARE @SQL varchar(2000)<br />
WHILE @i &lt;= @NumberOfProcs<br />
BEGIN<br />
SELECT @ProcName = ProcName FROM #ProcList WHERE ID = @i<br />
SET @SQL = &#039;INSERT INTO #Result (TextField) EXEC sp_helptext &#039; + @ProcName<br />
EXEC (@SQL)<br />
UPDATE #Result SET ProcName = @ProcName WHERE ProcName IS NULL<br />
SET @i = @i + 1<br />
END</p>
<p>&#8211; Visualiza el resultado de la busqueda en una tabla<br />
SET @COMANDO = &#039;SELECT * FROM #Result WHERE TextField LIKE &#039;+CHAR(39)+&#039;%&#039;+@BUSCAR+&#039;%&#039;+CHAR(39)<br />
EXEC SP_EXECUTESQL @COMANDO</p>
<p>&#8211; clean up<br />
DROP TABLE #Result<br />
DROP TABLE #ProcList</p>
<p>END</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sitakanta Mishra</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-341480</link>
		<dc:creator><![CDATA[Sitakanta Mishra]]></dc:creator>
		<pubDate>Thu, 06 Sep 2012 12:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-341480</guid>
		<description><![CDATA[How to pass a database name as input parameter to a stored procedure in SQL Server 2008?]]></description>
		<content:encoded><![CDATA[<p>How to pass a database name as input parameter to a stored procedure in SQL Server 2008?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Find Column Used in Stored Procedure &#8211; Search Stored Procedure for Column Name &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-313509</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Find Column Used in Stored Procedure &#8211; Search Stored Procedure for Column Name &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sun, 15 Jul 2012 01:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-313509</guid>
		<description><![CDATA[[...] Search Stored Procedure Code – Search Stored Procedure Text [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Search Stored Procedure Code – Search Stored Procedure Text [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Norris</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-308391</link>
		<dc:creator><![CDATA[Paul Norris]]></dc:creator>
		<pubDate>Mon, 02 Jul 2012 07:18:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-308391</guid>
		<description><![CDATA[MSSQL Server 2005 keeps track of the dependencies for you: no need to search the object definition for possibly misleading text chunks.  This code returns all stored procedures that access the table Site, showing each column that is referenced:
DECLARE @tabName VARCHAR(60);
SET @tabName = &#039;Site&#039;;
SELECT DISTINCT
		pr.object_id AS procid, 
		pr.name, tab.name, col.name, 
		dep.is_selected, dep.is_updated, dep.is_select_all
	FROM sys.procedures pr 
		INNER JOIN sys.sql_dependencies dep ON pr.object_id = dep.object_id
		INNER JOIN sys.columns col ON dep.referenced_major_id = col.object_id
		INNER JOIN sys.tables tab ON tab.object_id = col.object_id
	WHERE tab.name = @tabName
	  AND dep.class IN (0, 1)
	  AND dep.is_updated = 1
--	  AND col.name = &#039;Source&#039;
	ORDER BY pr.name]]></description>
		<content:encoded><![CDATA[<p>MSSQL Server 2005 keeps track of the dependencies for you: no need to search the object definition for possibly misleading text chunks.  This code returns all stored procedures that access the table Site, showing each column that is referenced:<br />
DECLARE @tabName VARCHAR(60);<br />
SET @tabName = &#8216;Site&#8217;;<br />
SELECT DISTINCT<br />
		pr.object_id AS procid,<br />
		pr.name, tab.name, col.name,<br />
		dep.is_selected, dep.is_updated, dep.is_select_all<br />
	FROM sys.procedures pr<br />
		INNER JOIN sys.sql_dependencies dep ON pr.object_id = dep.object_id<br />
		INNER JOIN sys.columns col ON dep.referenced_major_id = col.object_id<br />
		INNER JOIN sys.tables tab ON tab.object_id = col.object_id<br />
	WHERE tab.name = @tabName<br />
	  AND dep.class IN (0, 1)<br />
	  AND dep.is_updated = 1<br />
&#8211;	  AND col.name = &#8216;Source&#8217;<br />
	ORDER BY pr.name</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Itzhak</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-306821</link>
		<dc:creator><![CDATA[Itzhak]]></dc:creator>
		<pubDate>Thu, 28 Jun 2012 07:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-306821</guid>
		<description><![CDATA[Best answer ever!!!
Thank you very much :)
Itzhak from Israel]]></description>
		<content:encoded><![CDATA[<p>Best answer ever!!!<br />
Thank you very much :)<br />
Itzhak from Israel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-302820</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 18 Jun 2012 12:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-302820</guid>
		<description><![CDATA[What do you mean by it?]]></description>
		<content:encoded><![CDATA[<p>What do you mean by it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manjeet singh</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-292278</link>
		<dc:creator><![CDATA[manjeet singh]]></dc:creator>
		<pubDate>Fri, 01 Jun 2012 13:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-292278</guid>
		<description><![CDATA[How I can Get all Store Procedure in which a table insert its value]]></description>
		<content:encoded><![CDATA[<p>How I can Get all Store Procedure in which a table insert its value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Janet Conklin</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-277858</link>
		<dc:creator><![CDATA[Janet Conklin]]></dc:creator>
		<pubDate>Fri, 20 Apr 2012 13:02:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-277858</guid>
		<description><![CDATA[Thanks for the excellent post!]]></description>
		<content:encoded><![CDATA[<p>Thanks for the excellent post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subba Rao</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-262766</link>
		<dc:creator><![CDATA[Subba Rao]]></dc:creator>
		<pubDate>Wed, 14 Mar 2012 02:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-262766</guid>
		<description><![CDATA[Thank You Tatyana, that was useful :)]]></description>
		<content:encoded><![CDATA[<p>Thank You Tatyana, that was useful :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dims</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-235969</link>
		<dc:creator><![CDATA[Dims]]></dc:creator>
		<pubDate>Thu, 12 Jan 2012 10:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-235969</guid>
		<description><![CDATA[hello sir 

I want to search a particular string from text  and retrieve the sub-string which is separated by &#039;.&#039; and that sentence contains searching string]]></description>
		<content:encoded><![CDATA[<p>hello sir </p>
<p>I want to search a particular string from text  and retrieve the sub-string which is separated by &#8216;.&#8217; and that sentence contains searching string</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-231187</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 11:05:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-231187</guid>
		<description><![CDATA[You can call another procedure inside the main procedure that uses main procedure&#039;s argument]]></description>
		<content:encoded><![CDATA[<p>You can call another procedure inside the main procedure that uses main procedure&#8217;s argument</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ANU</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-226514</link>
		<dc:creator><![CDATA[ANU]]></dc:creator>
		<pubDate>Tue, 27 Dec 2011 04:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-226514</guid>
		<description><![CDATA[I HAVE TO PASS ARGUEMENTS FROM ONE SP TO ANOTHER. WHAT SHOULD I DO????]]></description>
		<content:encoded><![CDATA[<p>I HAVE TO PASS ARGUEMENTS FROM ONE SP TO ANOTHER. WHAT SHOULD I DO????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Poongodi</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-203717</link>
		<dc:creator><![CDATA[Poongodi]]></dc:creator>
		<pubDate>Thu, 24 Nov 2011 14:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-203717</guid>
		<description><![CDATA[Hi, 
    I have written stored procedure with the where clause(e.g description=&#039;End of process&#039;). Can i find stored procedures with the above description.


Thanks
Poongodi]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
    I have written stored procedure with the where clause(e.g description=&#8217;End of process&#8217;). Can i find stored procedures with the above description.</p>
<p>Thanks<br />
Poongodi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaushal</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-139043</link>
		<dc:creator><![CDATA[kaushal]]></dc:creator>
		<pubDate>Sun, 05 Jun 2011 16:45:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-139043</guid>
		<description><![CDATA[hello sir ... I am using 3 updated query inside the stored procedure... Like..


declare @qry nvarchar(500)
begin transaction
update table1 set status=&#039;A&#039; where appno=@appno

update table2 set entrydate=@entrydate where appno=@appno

set @qry=&#039;update &#039; + tablename+ &#039; set status=@status where appno=@appno
exec sp_executesql @qry

commit transaction

when I am calling this SP from my .net code .. the queries inside transaction are not updating the table and SP give no error ... what should I do?? how to troubleshoot this problem...... thanks in advance]]></description>
		<content:encoded><![CDATA[<p>hello sir &#8230; I am using 3 updated query inside the stored procedure&#8230; Like..</p>
<p>declare @qry nvarchar(500)<br />
begin transaction<br />
update table1 set status=&#8217;A&#8217; where appno=@appno</p>
<p>update table2 set entrydate=@entrydate where appno=@appno</p>
<p>set @qry=&#8217;update &#8216; + tablename+ &#8216; set status=@status where appno=@appno<br />
exec sp_executesql @qry</p>
<p>commit transaction</p>
<p>when I am calling this SP from my .net code .. the queries inside transaction are not updating the table and SP give no error &#8230; what should I do?? how to troubleshoot this problem&#8230;&#8230; thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishna</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-135417</link>
		<dc:creator><![CDATA[Krishna]]></dc:creator>
		<pubDate>Fri, 20 May 2011 09:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-135417</guid>
		<description><![CDATA[Hi,

How can i get the particular character location/position from table column.

ex. select * from TABLENAME Functionname(table_column,&#039;;&#039;)]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>How can i get the particular character location/position from table column.</p>
<p>ex. select * from TABLENAME Functionname(table_column,&#8217;;')</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raja</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-134775</link>
		<dc:creator><![CDATA[raja]]></dc:creator>
		<pubDate>Tue, 17 May 2011 07:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-134775</guid>
		<description><![CDATA[how to add  validation &amp; condition (time)  for store procedure]]></description>
		<content:encoded><![CDATA[<p>how to add  validation &amp; condition (time)  for store procedure</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shabbir</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-133179</link>
		<dc:creator><![CDATA[shabbir]]></dc:creator>
		<pubDate>Fri, 06 May 2011 12:11:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-133179</guid>
		<description><![CDATA[i m giving some CreateXmlFile
procedure using visual studio

-------------procedure WriteDataToXml-----------------------------

Create proc Writedatatoxml @tbname nvarchar(20),@path nvarchar(100)
as
external name myxmlconvertionassembly.[createxml.converttoxml].writexml]]></description>
		<content:encoded><![CDATA[<p>i m giving some CreateXmlFile<br />
procedure using visual studio</p>
<p>&#8212;&#8212;&#8212;&#8212;-procedure WriteDataToXml&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Create proc Writedatatoxml @tbname nvarchar(20),@path nvarchar(100)<br />
as<br />
external name myxmlconvertionassembly.[createxml.converttoxml].writexml</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saidul Karim</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-129870</link>
		<dc:creator><![CDATA[Saidul Karim]]></dc:creator>
		<pubDate>Tue, 19 Apr 2011 01:02:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-129870</guid>
		<description><![CDATA[You are a handy-man. 
Thanks a lot for undertaking all hard-work.]]></description>
		<content:encoded><![CDATA[<p>You are a handy-man.<br />
Thanks a lot for undertaking all hard-work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sanjay rai</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-120459</link>
		<dc:creator><![CDATA[sanjay rai]]></dc:creator>
		<pubDate>Thu, 24 Feb 2011 07:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-120459</guid>
		<description><![CDATA[Hi,
Please give me the solution for:

I have Stored Procedure name: USP_Get_Daily_Report_PriorityWise

ALTER PROC [dbo].[USP_Get_Daily_Report_PriorityWise]
AS
Begin
set nocount on
  DECLARE @Loc_Table TABLE (Counts INT, Internal_Priority VARCHAR(20), Process_Area VARCHAR(1000))

	INSERT INTO @Loc_Table
			SELECT COUNT(*),Internal_Priority, Process_Area FROM AgedReportPivot (NOLOCK)
			WHERE (Internal_Priority IN (&#039;1&#039;,&#039;2&#039;,&#039;3&#039;,&#039;4&#039;,&#039;Other&#039;))
			AND (Status NOT IN (&#039;CANCELLED&#039;, &#039;RESOLVED&#039;, &#039;CLOSED&#039;))
			GROUP BY Process_Area,Internal_Priority

	DECLARE @loc_Result Table (Process_Area VARCHAr(1000),a INT,b INT,c INT,d INT,Other VARCHAr(10))
	--DECLARE @loc_Result Table (Process_Area VARCHAr(1000),1 INT,2 INT,3 INT,4 INT,Other VARCHAr(10))
	

	INSERT INTO @loc_Result
	  SELECT Process_Area,[1] as a,[2]As b,[3]AS c,
			[4] AS d,[Other] AS Others
      FROM(SELECT Counts,Internal_Priority,Process_Area
           FROM @Loc_Table
          ) p
          PIVOT
          (SUM(Counts)
          FOR Internal_Priority IN ([1],[2],[3],[4],[Other]))
          AS pvt

------------------------PSI last 30 days data---------------------------------
		declare @PSIData int;
		SELECT @PSIData = COUNT(*) FROM dbo.PSIAgedRequestAll (NOLOCK)
		WHERE (Status NOT IN (&#039;CANCELLED&#039;)) AND (Reported_Date &gt;= GETDATE() - 30)
		AND (Reported_Date = GETDATE() - 30)
		AND (Reported_Date = GETDATE() - 30)
		AND (Reported_Date &lt;= GETDATE())

set nocount off
END

There are 8 columns: 
LastDays is Last 30 days Requests inflow (Open, Closed, Resolved etc). 
Priority1,Priority2, Priority3, Priority4,PriorityOthers, are all open request count.
Total=Priority1+Priority2+Priority3+Priority4+PriorityOthers

Result:
Priority1	Priority2	Priority3	Priority4	PriorityOthers	Process_Area	LASTDAYS	Total
NULL	NULL	1	NULL	7	Customer Masterdata	13	61.54
NULL	1	6	NULL	15	P2P	48	45.83
NULL	NULL	3	NULL	1	CRM-Complaints	9	44.44
NULL	2	3	NULL	6	Material MasterData	25	44
NULL	NULL	4	NULL	NULL	CRM Field Service	10	40
NULL	2	11	NULL	1	TheEdge	36	38.89
NULL	10	31	NULL	57	Finance	305	32.13
NULL	1	24	NULL	NULL	Non-ERP	92	27.17
NULL	NULL	4	NULL	4	CRM Internet Sales	36	22.22
NULL	1	9	NULL	10	MFG	92	21.74
NULL	4	10	NULL	NULL	GEMS	65	21.54
NULL	10	33	NULL	132	PSI	395	19.25
NULL	3	3	1	20	EHS	163	16.56
NULL	3	9	NULL	42	OTC	364	14.84
NULL	4	11	NULL	1	APO	122	13.11
NULL	2	3	NULL	14	BI	281	6.76
NULL	1	3	NULL	6	ABAP	152	6.58
NULL	9	5	NULL	2	Basis	362	4.42


My Requirement in the same table:

Now I want to fibercate data according to Priority wise and in the same need to show out of last 30 days request count how many are Priority 1, Priority 2 etc
Ex:
If Priority 3 request count for Process_Area P2P are 6. Out of last 30 days 48 request count for P2P,how many are Priority 3?

  Priority 3	
10	6

Here 10 are Inflow Priority 3 out of 48 requests and 6 is Open for Priority 3.]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
Please give me the solution for:</p>
<p>I have Stored Procedure name: USP_Get_Daily_Report_PriorityWise</p>
<p>ALTER PROC [dbo].[USP_Get_Daily_Report_PriorityWise]<br />
AS<br />
Begin<br />
set nocount on<br />
  DECLARE @Loc_Table TABLE (Counts INT, Internal_Priority VARCHAR(20), Process_Area VARCHAR(1000))</p>
<p>	INSERT INTO @Loc_Table<br />
			SELECT COUNT(*),Internal_Priority, Process_Area FROM AgedReportPivot (NOLOCK)<br />
			WHERE (Internal_Priority IN (&#8217;1&#8242;,&#8217;2&#8242;,&#8217;3&#8242;,&#8217;4&#8242;,&#8217;Other&#8217;))<br />
			AND (Status NOT IN (&#8216;CANCELLED&#8217;, &#8216;RESOLVED&#8217;, &#8216;CLOSED&#8217;))<br />
			GROUP BY Process_Area,Internal_Priority</p>
<p>	DECLARE @loc_Result Table (Process_Area VARCHAr(1000),a INT,b INT,c INT,d INT,Other VARCHAr(10))<br />
	&#8211;DECLARE @loc_Result Table (Process_Area VARCHAr(1000),1 INT,2 INT,3 INT,4 INT,Other VARCHAr(10))</p>
<p>	INSERT INTO @loc_Result<br />
	  SELECT Process_Area,[1] as a,[2]As b,[3]AS c,<br />
			[4] AS d,[Other] AS Others<br />
      FROM(SELECT Counts,Internal_Priority,Process_Area<br />
           FROM @Loc_Table<br />
          ) p<br />
          PIVOT<br />
          (SUM(Counts)<br />
          FOR Internal_Priority IN ([1],[2],[3],[4],[Other]))<br />
          AS pvt</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;PSI last 30 days data&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
		declare @PSIData int;<br />
		SELECT @PSIData = COUNT(*) FROM dbo.PSIAgedRequestAll (NOLOCK)<br />
		WHERE (Status NOT IN (&#8216;CANCELLED&#8217;)) AND (Reported_Date &gt;= GETDATE() &#8211; 30)<br />
		AND (Reported_Date = GETDATE() &#8211; 30)<br />
		AND (Reported_Date = GETDATE() &#8211; 30)<br />
		AND (Reported_Date &lt;= GETDATE())</p>
<p>set nocount off<br />
END</p>
<p>There are 8 columns:<br />
LastDays is Last 30 days Requests inflow (Open, Closed, Resolved etc).<br />
Priority1,Priority2, Priority3, Priority4,PriorityOthers, are all open request count.<br />
Total=Priority1+Priority2+Priority3+Priority4+PriorityOthers</p>
<p>Result:<br />
Priority1	Priority2	Priority3	Priority4	PriorityOthers	Process_Area	LASTDAYS	Total<br />
NULL	NULL	1	NULL	7	Customer Masterdata	13	61.54<br />
NULL	1	6	NULL	15	P2P	48	45.83<br />
NULL	NULL	3	NULL	1	CRM-Complaints	9	44.44<br />
NULL	2	3	NULL	6	Material MasterData	25	44<br />
NULL	NULL	4	NULL	NULL	CRM Field Service	10	40<br />
NULL	2	11	NULL	1	TheEdge	36	38.89<br />
NULL	10	31	NULL	57	Finance	305	32.13<br />
NULL	1	24	NULL	NULL	Non-ERP	92	27.17<br />
NULL	NULL	4	NULL	4	CRM Internet Sales	36	22.22<br />
NULL	1	9	NULL	10	MFG	92	21.74<br />
NULL	4	10	NULL	NULL	GEMS	65	21.54<br />
NULL	10	33	NULL	132	PSI	395	19.25<br />
NULL	3	3	1	20	EHS	163	16.56<br />
NULL	3	9	NULL	42	OTC	364	14.84<br />
NULL	4	11	NULL	1	APO	122	13.11<br />
NULL	2	3	NULL	14	BI	281	6.76<br />
NULL	1	3	NULL	6	ABAP	152	6.58<br />
NULL	9	5	NULL	2	Basis	362	4.42</p>
<p>My Requirement in the same table:</p>
<p>Now I want to fibercate data according to Priority wise and in the same need to show out of last 30 days request count how many are Priority 1, Priority 2 etc<br />
Ex:<br />
If Priority 3 request count for Process_Area P2P are 6. Out of last 30 days 48 request count for P2P,how many are Priority 3?</p>
<p>  Priority 3<br />
10	6</p>
<p>Here 10 are Inflow Priority 3 out of 48 requests and 6 is Open for Priority 3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-120085</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 22 Feb 2011 11:46:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-120085</guid>
		<description><![CDATA[You can use function in the procedure like below

create procedure proc_name
as
.
.
select dbo.function_name(parameter)]]></description>
		<content:encoded><![CDATA[<p>You can use function in the procedure like below</p>
<p>create procedure proc_name<br />
as<br />
.<br />
.<br />
select dbo.function_name(parameter)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jasmin Suma</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-119921</link>
		<dc:creator><![CDATA[Jasmin Suma]]></dc:creator>
		<pubDate>Mon, 21 Feb 2011 16:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-119921</guid>
		<description><![CDATA[Could anyone give pls give any information about how can i use user defined function in sore procedure using sql server 2005??]]></description>
		<content:encoded><![CDATA[<p>Could anyone give pls give any information about how can i use user defined function in sore procedure using sql server 2005??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-110976</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 14 Jan 2011 11:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-110976</guid>
		<description><![CDATA[Read about them in sql server help file]]></description>
		<content:encoded><![CDATA[<p>Read about them in sql server help file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vatanak</title>
		<link>http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-110835</link>
		<dc:creator><![CDATA[vatanak]]></dc:creator>
		<pubDate>Thu, 13 Jan 2011 13:27:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/#comment-110835</guid>
		<description><![CDATA[can u tell me abt syntax of store procedure {control structure (Looping &amp; if ) }]]></description>
		<content:encoded><![CDATA[<p>can u tell me abt syntax of store procedure {control structure (Looping &amp; if ) }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
