<?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; Simple Example of WHILE Loop With CONTINUE and BREAK Keywords</title>
	<atom:link href="http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56480</link>
		<dc:creator>Imran Mohammed</dc:creator>
		<pubDate>Wed, 07 Oct 2009 00:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56480</guid>
		<description>@Anjaneyulu 

create proc USP_Example_Sp 
AS
SET NOCOUNT ON 
Declare @count int 
Set @count = 1 
Declare @table table ( id int Identity , Ename Varchar (40))

While @Count &lt; = 10 
Begin 
Insert into @table values (&#039;Imran&#039;)
Set @Count = @Count + 1 
End 
Select * from @table 
SET NOCOUNT OFF 

go
Exec USP_Example_Sp
go 
Drop proc USP_Example_Sp

~ IM</description>
		<content:encoded><![CDATA[<p>@Anjaneyulu </p>
<p>create proc USP_Example_Sp<br />
AS<br />
SET NOCOUNT ON<br />
Declare @count int<br />
Set @count = 1<br />
Declare @table table ( id int Identity , Ename Varchar (40))</p>
<p>While @Count &lt; = 10<br />
Begin<br />
Insert into @table values (&#039;Imran&#039;)<br />
Set @Count = @Count + 1<br />
End<br />
Select * from @table<br />
SET NOCOUNT OFF </p>
<p>go<br />
Exec USP_Example_Sp<br />
go<br />
Drop proc USP_Example_Sp</p>
<p>~ IM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anjaneyulu V</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56467</link>
		<dc:creator>Anjaneyulu V</dc:creator>
		<pubDate>Tue, 06 Oct 2009 09:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56467</guid>
		<description>Hello Sir,

Can we use while loop in stored procedures??
If so please explain how to use?

Thanks,
Anjaneyulu V</description>
		<content:encoded><![CDATA[<p>Hello Sir,</p>
<p>Can we use while loop in stored procedures??<br />
If so please explain how to use?</p>
<p>Thanks,<br />
Anjaneyulu V</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tejas Shah</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56436</link>
		<dc:creator>Tejas Shah</dc:creator>
		<pubDate>Mon, 05 Oct 2009 12:08:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56436</guid>
		<description>Hi Teja,


Why you need to loop thru it and display 50000 rows?

Its better to write query such a way, so it gives result of 50000 rows that you want to display.

LOOP will decrease the performance.

Thanks,
Tejas
SQLYoga.com</description>
		<content:encoded><![CDATA[<p>Hi Teja,</p>
<p>Why you need to loop thru it and display 50000 rows?</p>
<p>Its better to write query such a way, so it gives result of 50000 rows that you want to display.</p>
<p>LOOP will decrease the performance.</p>
<p>Thanks,<br />
Tejas<br />
SQLYoga.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Teja</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56307</link>
		<dc:creator>Teja</dc:creator>
		<pubDate>Thu, 01 Oct 2009 07:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-56307</guid>
		<description>hello sir,

In sqlserver 2005 i had a table containing 3 lakh rows ...i need to display 50000 records each time using loop.can anybody help me....

thnks in advance.</description>
		<content:encoded><![CDATA[<p>hello sir,</p>
<p>In sqlserver 2005 i had a table containing 3 lakh rows &#8230;i need to display 50000 records each time using loop.can anybody help me&#8230;.</p>
<p>thnks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-53131</link>
		<dc:creator>Imran Mohammed</dc:creator>
		<pubDate>Sat, 20 Jun 2009 04:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-53131</guid>
		<description>@Shafique,

Declare @Var int
Set @Var = 1 

While @Var &lt; = ( Select Count(*) from Table_Name)
Begin
    perform action by executing scripts
    Set @Var = @Var+1
End


Should work, if you have questions, please let us know.
~ IM.</description>
		<content:encoded><![CDATA[<p>@Shafique,</p>
<p>Declare @Var int<br />
Set @Var = 1 </p>
<p>While @Var &lt; = ( Select Count(*) from Table_Name)<br />
Begin<br />
    perform action by executing scripts<br />
    Set @Var = @Var+1<br />
End</p>
<p>Should work, if you have questions, please let us know.<br />
~ IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shafique</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-53114</link>
		<dc:creator>Shafique</dc:creator>
		<pubDate>Fri, 19 Jun 2009 11:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-53114</guid>
		<description>nice helped me alot, but i am looking to iterate the loop no of rows in a table can any body help me</description>
		<content:encoded><![CDATA[<p>nice helped me alot, but i am looking to iterate the loop no of rows in a table can any body help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: louie</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-52647</link>
		<dc:creator>louie</dc:creator>
		<pubDate>Tue, 02 Jun 2009 11:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-52647</guid>
		<description>nice loop</description>
		<content:encoded><![CDATA[<p>nice loop</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priya</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-46909</link>
		<dc:creator>Priya</dc:creator>
		<pubDate>Thu, 19 Feb 2009 11:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-46909</guid>
		<description>Thank You Very Much...</description>
		<content:encoded><![CDATA[<p>Thank You Very Much&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sumanta</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-46238</link>
		<dc:creator>Sumanta</dc:creator>
		<pubDate>Mon, 02 Feb 2009 13:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-46238</guid>
		<description>alter PROCEDURE [dbo].[usp_AddUpdatePatientRegistration]
(
@i int=0,
@str1 nvarchar(50),
@str nvarchar(50) output
)
	
AS
BEGIN
 

set @str1=(select tree_name from user_tree where app_no=&#039;090001&#039;)
while(@i &lt; @str1)
begin
 set @str=@str +&#039;&#039;+@str1
	end
END


This is my produture not run 
i want to @str1 select lotsof rows that rows are concanect one string in how
and return that value</description>
		<content:encoded><![CDATA[<p>alter PROCEDURE [dbo].[usp_AddUpdatePatientRegistration]<br />
(<br />
@i int=0,<br />
@str1 nvarchar(50),<br />
@str nvarchar(50) output<br />
)</p>
<p>AS<br />
BEGIN</p>
<p>set @str1=(select tree_name from user_tree where app_no=&#8217;090001&#8242;)<br />
while(@i &lt; @str1)<br />
begin<br />
 set @str=@str +&#8221;+@str1<br />
	end<br />
END</p>
<p>This is my produture not run<br />
i want to @str1 select lotsof rows that rows are concanect one string in how<br />
and return that value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-45457</link>
		<dc:creator>john</dc:creator>
		<pubDate>Thu, 08 Jan 2009 08:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-45457</guid>
		<description>please reply me ...
my question is....

if i have a table with a field date_time..
and i want to run a query when i found date_time matching with GETDATE() and continuously checking the date_time field.

so this is how i have to write a loop or what ever you suggest .... to continuously running a loop ( endless loop)</description>
		<content:encoded><![CDATA[<p>please reply me &#8230;<br />
my question is&#8230;.</p>
<p>if i have a table with a field date_time..<br />
and i want to run a query when i found date_time matching with GETDATE() and continuously checking the date_time field.</p>
<p>so this is how i have to write a loop or what ever you suggest &#8230;. to continuously running a loop ( endless loop)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-44933</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Fri, 19 Dec 2008 06:54:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-44933</guid>
		<description>sir,

i had a doubt that is  can we use while loop with select satement ? example i want to extract name one by one by using while loop in sql is it possible?</description>
		<content:encoded><![CDATA[<p>sir,</p>
<p>i had a doubt that is  can we use while loop with select satement ? example i want to extract name one by one by using while loop in sql is it possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kalinga AmilaU</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-44776</link>
		<dc:creator>Kalinga AmilaU</dc:creator>
		<pubDate>Sat, 13 Dec 2008 07:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-44776</guid>
		<description>Thanks

How to give a static prefix for the number incremented</description>
		<content:encoded><![CDATA[<p>Thanks</p>
<p>How to give a static prefix for the number incremented</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kandarp</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43712</link>
		<dc:creator>Kandarp</dc:creator>
		<pubDate>Wed, 15 Oct 2008 11:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43712</guid>
		<description>nice article.
but how can we iterate through each record obtained from the select statement in the stored procedure?
thanks in advance</description>
		<content:encoded><![CDATA[<p>nice article.<br />
but how can we iterate through each record obtained from the select statement in the stored procedure?<br />
thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nestor</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43649</link>
		<dc:creator>nestor</dc:creator>
		<pubDate>Fri, 10 Oct 2008 22:34:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43649</guid>
		<description>is there a instruction like foreach row???</description>
		<content:encoded><![CDATA[<p>is there a instruction like foreach row???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manoj</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43454</link>
		<dc:creator>manoj</dc:creator>
		<pubDate>Thu, 02 Oct 2008 17:58:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43454</guid>
		<description>thanks.........</description>
		<content:encoded><![CDATA[<p>thanks&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: smita</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43393</link>
		<dc:creator>smita</dc:creator>
		<pubDate>Tue, 30 Sep 2008 08:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-43393</guid>
		<description>Hi!
What is difference between navigating records in while loop and cursor ?</description>
		<content:encoded><![CDATA[<p>Hi!<br />
What is difference between navigating records in while loop and cursor ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shameer</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-42592</link>
		<dc:creator>Shameer</dc:creator>
		<pubDate>Tue, 09 Sep 2008 11:00:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-42592</guid>
		<description>Thankyou Dave, it helped me a lot....</description>
		<content:encoded><![CDATA[<p>Thankyou Dave, it helped me a lot&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MM</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-42217</link>
		<dc:creator>MM</dc:creator>
		<pubDate>Sun, 31 Aug 2008 00:31:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-42217</guid>
		<description>Cheers Dude</description>
		<content:encoded><![CDATA[<p>Cheers Dude</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artur</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-42057</link>
		<dc:creator>Artur</dc:creator>
		<pubDate>Tue, 26 Aug 2008 13:52:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-42057</guid>
		<description>Thanks</description>
		<content:encoded><![CDATA[<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahesh Tryambake</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-41196</link>
		<dc:creator>Mahesh Tryambake</dc:creator>
		<pubDate>Fri, 01 Aug 2008 21:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-41196</guid>
		<description>i want a function for factorial
tx</description>
		<content:encoded><![CDATA[<p>i want a function for factorial<br />
tx</p>
]]></content:encoded>
	</item>
</channel>
</rss>
