<?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>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Mon, 13 Feb 2012 15:11:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Mahmoud Shahin</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-223433</link>
		<dc:creator><![CDATA[Mahmoud Shahin]]></dc:creator>
		<pubDate>Thu, 22 Dec 2011 05:42:00 +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-223433</guid>
		<description><![CDATA[thank  you  very  much]]></description>
		<content:encoded><![CDATA[<p>thank  you  very  much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ekta</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-218694</link>
		<dc:creator><![CDATA[Ekta]]></dc:creator>
		<pubDate>Thu, 15 Dec 2011 20:50: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-218694</guid>
		<description><![CDATA[Hello Sir,

I have one table named &quot;Account&quot; and fields are(rec_seq,acc_id,security_key,party_name,party_addr_line1) I want to display different coulmns in each row :

output should be :

First row : 
rec_seq,acc_id,security_key (where rec_seq=1 i.e. display selected column when rec_seq =1 )


Second row: 
rec_seq,party_name,party_addr_line1,party_addr_line2 (where rec_seq=2i.e. display selected column when rec_seq =2)

Right now Account table data look like below:

rec_seq	acc_id	security_key party_name  party_addr_line1
1	10001	1	      NULL              NULL
1	10002	2                    NULL              NULL
2              10002	NULL              b                    ab
1	10002	3                    NULL              NULL
2	10002	NULL             b                     bc
2	10002	NULL             jk                     lm

I want to fetch data from this table and display output like :
(rec_seq=1 so display rec_seq,acc_id &amp; security_id)
(rec_seq=2 display party_name and party_addr_line1)


1	10001	1 
1	10002	2                 
2              10002	b                    ab 
1	10002	3                   
2	10002	b                     bc
2	10002	jk                     lm



Please help me out..

Thanks in advance!!]]></description>
		<content:encoded><![CDATA[<p>Hello Sir,</p>
<p>I have one table named &#8220;Account&#8221; and fields are(rec_seq,acc_id,security_key,party_name,party_addr_line1) I want to display different coulmns in each row :</p>
<p>output should be :</p>
<p>First row :<br />
rec_seq,acc_id,security_key (where rec_seq=1 i.e. display selected column when rec_seq =1 )</p>
<p>Second row:<br />
rec_seq,party_name,party_addr_line1,party_addr_line2 (where rec_seq=2i.e. display selected column when rec_seq =2)</p>
<p>Right now Account table data look like below:</p>
<p>rec_seq	acc_id	security_key party_name  party_addr_line1<br />
1	10001	1	      NULL              NULL<br />
1	10002	2                    NULL              NULL<br />
2              10002	NULL              b                    ab<br />
1	10002	3                    NULL              NULL<br />
2	10002	NULL             b                     bc<br />
2	10002	NULL             jk                     lm</p>
<p>I want to fetch data from this table and display output like :<br />
(rec_seq=1 so display rec_seq,acc_id &amp; security_id)<br />
(rec_seq=2 display party_name and party_addr_line1)</p>
<p>1	10001	1<br />
1	10002	2<br />
2              10002	b                    ab<br />
1	10002	3<br />
2	10002	b                     bc<br />
2	10002	jk                     lm</p>
<p>Please help me out..</p>
<p>Thanks in advance!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ekta</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-218614</link>
		<dc:creator><![CDATA[Ekta]]></dc:creator>
		<pubDate>Thu, 15 Dec 2011 17:36:07 +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-218614</guid>
		<description><![CDATA[Hello Sir,

I have Temp table with the column(rec_seq,acc_id,tax_id,zip,party_name,addr_line1,addr_line2) and I want to display table with different columns in each row like :
First row : rec_seq,acc_id,tax_id,zip (wehre rec_seq =1)
Second row : party_name,addr_line1,addr_line2 (where rec_seq=2)
and store this result into another table
How can I do that..

please do help me out.

Thanks in advance.]]></description>
		<content:encoded><![CDATA[<p>Hello Sir,</p>
<p>I have Temp table with the column(rec_seq,acc_id,tax_id,zip,party_name,addr_line1,addr_line2) and I want to display table with different columns in each row like :<br />
First row : rec_seq,acc_id,tax_id,zip (wehre rec_seq =1)<br />
Second row : party_name,addr_line1,addr_line2 (where rec_seq=2)<br />
and store this result into another table<br />
How can I do that..</p>
<p>please do help me out.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samyuktha</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-213508</link>
		<dc:creator><![CDATA[Samyuktha]]></dc:creator>
		<pubDate>Thu, 08 Dec 2011 15:31:48 +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-213508</guid>
		<description><![CDATA[Hi Pinal,

I got a task to do.I need to insert 400,000 rows into Adventure Works DB table inorder to see how Proactive caching works in different scenarios.
My question is how to insert 400,000 rows at a time in a table.
Can you let me know the script to generate it.

Please do help me out.

Thanks in Advance.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I got a task to do.I need to insert 400,000 rows into Adventure Works DB table inorder to see how Proactive caching works in different scenarios.<br />
My question is how to insert 400,000 rows at a time in a table.<br />
Can you let me know the script to generate it.</p>
<p>Please do help me out.</p>
<p>Thanks in Advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suresh</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-208773</link>
		<dc:creator><![CDATA[suresh]]></dc:creator>
		<pubDate>Thu, 01 Dec 2011 17:55: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-208773</guid>
		<description><![CDATA[how to print * using sql query(traingle shape)
please give query here]]></description>
		<content:encoded><![CDATA[<p>how to print * using sql query(traingle shape)<br />
please give query here</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernando</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-189145</link>
		<dc:creator><![CDATA[Fernando]]></dc:creator>
		<pubDate>Sat, 05 Nov 2011 22:43:49 +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-189145</guid>
		<description><![CDATA[Pinal Dave  thanks a lot for the example..

Fernando 

from Bolivia]]></description>
		<content:encoded><![CDATA[<p>Pinal Dave  thanks a lot for the example..</p>
<p>Fernando </p>
<p>from Bolivia</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: richa</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-177433</link>
		<dc:creator><![CDATA[richa]]></dc:creator>
		<pubDate>Tue, 11 Oct 2011 07:27: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-177433</guid>
		<description><![CDATA[how to use loop inside my procedure for all month dates..
my procedure is:



alter procedure dateWiseAttnd
as
begin
	select Employee,
max(case when day(att_date)=&#039;01&#039; then Attendance_Status else &#039;&#039; end) &#039;day1&#039;,
max(case when day(att_date)=&#039;02&#039; then Attendance_Status else &#039;&#039; end) &#039;day2&#039;,
max(case when day(att_date)=&#039;03&#039; then Attendance_Status else &#039;&#039; end) &#039;day3&#039;,
max(case when day(att_date)=&#039;04&#039; then Attendance_Status else &#039;&#039; end) &#039;day4&#039;,
max(case when day(att_date)=&#039;05&#039; then Attendance_Status else &#039;&#039; end) &#039;day5&#039;,
max(case when day(att_date)=&#039;06&#039; then Attendance_Status else &#039;&#039; end) &#039;day6&#039;,
max(case when day(att_date)=&#039;07&#039; then Attendance_Status else &#039;&#039; end) &#039;day7&#039;,
max(case when day(att_date)=&#039;08&#039; then Attendance_Status else &#039;&#039; end) &#039;day8&#039;
from
(select e.EMP_FIRST_NAME+&#039; &#039;+e.EMP_LAST_NAME Employee,a.Attendance_Status,a.att_date 
from attendance_report a,EMPLOYEE_MASTER e
where MONTH(a.att_date)=&#039;07&#039;
and YEAR(a.att_date)=&#039;2011&#039;
and a.emp_id=e.ID
)tbl
group by Employee	
end]]></description>
		<content:encoded><![CDATA[<p>how to use loop inside my procedure for all month dates..<br />
my procedure is:</p>
<p>alter procedure dateWiseAttnd<br />
as<br />
begin<br />
	select Employee,<br />
max(case when day(att_date)=&#8217;01&#8242; then Attendance_Status else &#8221; end) &#8216;day1&#8242;,<br />
max(case when day(att_date)=&#8217;02&#8242; then Attendance_Status else &#8221; end) &#8216;day2&#8242;,<br />
max(case when day(att_date)=&#8217;03&#8242; then Attendance_Status else &#8221; end) &#8216;day3&#8242;,<br />
max(case when day(att_date)=&#8217;04&#8242; then Attendance_Status else &#8221; end) &#8216;day4&#8242;,<br />
max(case when day(att_date)=&#8217;05&#8242; then Attendance_Status else &#8221; end) &#8216;day5&#8242;,<br />
max(case when day(att_date)=&#8217;06&#8242; then Attendance_Status else &#8221; end) &#8216;day6&#8242;,<br />
max(case when day(att_date)=&#8217;07&#8242; then Attendance_Status else &#8221; end) &#8216;day7&#8242;,<br />
max(case when day(att_date)=&#8217;08&#8242; then Attendance_Status else &#8221; end) &#8216;day8&#8242;<br />
from<br />
(select e.EMP_FIRST_NAME+&#8217; &#8216;+e.EMP_LAST_NAME Employee,a.Attendance_Status,a.att_date<br />
from attendance_report a,EMPLOYEE_MASTER e<br />
where MONTH(a.att_date)=&#8217;07&#8242;<br />
and YEAR(a.att_date)=&#8217;2011&#8242;<br />
and a.emp_id=e.ID<br />
)tbl<br />
group by Employee<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-168640</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 07:46:44 +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-168640</guid>
		<description><![CDATA[What are you doing inside a procedure? Instead of calling the procedure 21 times in your case, you can have another parameter in the procedure which accepts to_date and execute the code inside a procedure as many times]]></description>
		<content:encoded><![CDATA[<p>What are you doing inside a procedure? Instead of calling the procedure 21 times in your case, you can have another parameter in the procedure which accepts to_date and execute the code inside a procedure as many times</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-168638</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 07:43:07 +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-168638</guid>
		<description><![CDATA[How are you executing the procedure? Post the code you have used. Also expalin what you are trying to do with the code]]></description>
		<content:encoded><![CDATA[<p>How are you executing the procedure? Post the code you have used. Also expalin what you are trying to do with the code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-168636</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 07:41:07 +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-168636</guid>
		<description><![CDATA[You need post some sample data with expected result to help you]]></description>
		<content:encoded><![CDATA[<p>You need post some sample data with expected result to help you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-168631</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 07:39:02 +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-168631</guid>
		<description><![CDATA[The SQL Server help file has explanation as well as code examples for While loop]]></description>
		<content:encoded><![CDATA[<p>The SQL Server help file has explanation as well as code examples for While loop</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-168627</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 07:36:32 +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-168627</guid>
		<description><![CDATA[select year(getdate())-number as year from master..spt_values
where type=&#039;p&#039; and number between 1 and 10
union 
select year(getdate())+number from master..spt_values
where type=&#039;p&#039; and number between 1 and 10
order by year]]></description>
		<content:encoded><![CDATA[<p>select year(getdate())-number as year from master..spt_values<br />
where type=&#8217;p&#8217; and number between 1 and 10<br />
union<br />
select year(getdate())+number from master..spt_values<br />
where type=&#8217;p&#8217; and number between 1 and 10<br />
order by year</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-168623</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 07:28: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-168623</guid>
		<description><![CDATA[Can you post your question in English language? My guess is that you want the following code


select replicate(&#039;*&#039;,number) from master..spt_values
where type=&#039;p&#039; and number between 1 and 7]]></description>
		<content:encoded><![CDATA[<p>Can you post your question in English language? My guess is that you want the following code</p>
<p>select replicate(&#8216;*&#8217;,number) from master..spt_values<br />
where type=&#8217;p&#8217; and number between 1 and 7</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thiethoe</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-168557</link>
		<dc:creator><![CDATA[thiethoe]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 02:37:47 +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-168557</guid>
		<description><![CDATA[Mw tanya gan caranya buat bintang-bintang dari SQL Server 2005 gmna :
Contoh :
*
* *
* * *
* * * *              
* * * * *            
* * * * * *    
* * * * * * *    
Mksh  gan]]></description>
		<content:encoded><![CDATA[<p>Mw tanya gan caranya buat bintang-bintang dari SQL Server 2005 gmna :<br />
Contoh :<br />
*<br />
* *<br />
* * *<br />
* * * *<br />
* * * * *<br />
* * * * * *<br />
* * * * * * *<br />
Mksh  gan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-164679</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 02 Sep 2011 07:51:51 +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-164679</guid>
		<description><![CDATA[Refer this quirky update technique
http://beyondrelational.com/blogs/madhivanan/archive/2009/06/10/quirky-update-in-sql-server.aspx]]></description>
		<content:encoded><![CDATA[<p>Refer this quirky update technique<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2009/06/10/quirky-update-in-sql-server.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2009/06/10/quirky-update-in-sql-server.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naidu</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-163886</link>
		<dc:creator><![CDATA[Naidu]]></dc:creator>
		<pubDate>Wed, 31 Aug 2011 07:38: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-163886</guid>
		<description><![CDATA[Hi, Please help me in dis, 
 i want to update the like first i need to check the value whether it is null or blank.. if yes den update the Null record to 7777(1st value), for the next Value updation it suppose to add 7777+1,next 7777+1+1, it shd go like dis... n store error message &#039;Blank record or Null Record.&#039;]]></description>
		<content:encoded><![CDATA[<p>Hi, Please help me in dis,<br />
 i want to update the like first i need to check the value whether it is null or blank.. if yes den update the Null record to 7777(1st value), for the next Value updation it suppose to add 7777+1,next 7777+1+1, it shd go like dis&#8230; n store error message &#8216;Blank record or Null Record.&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj Sahoo</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-152603</link>
		<dc:creator><![CDATA[Manoj Sahoo]]></dc:creator>
		<pubDate>Tue, 02 Aug 2011 07:15:30 +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-152603</guid>
		<description><![CDATA[Thank u sir.
It helped me a lot.]]></description>
		<content:encoded><![CDATA[<p>Thank u sir.<br />
It helped me a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Budi Arto</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-149760</link>
		<dc:creator><![CDATA[Budi Arto]]></dc:creator>
		<pubDate>Thu, 21 Jul 2011 09:53: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-149760</guid>
		<description><![CDATA[DECLARE @intFlag INT
 SET @intFlag = 1
 
 WHILE (@intFlag &lt;=5) BEGIN
  print @intflag
  
 SET @intFlag = @intFlag + 1
 IF @intFlag = 4
 Set @intFlag = @intFlag + 1

 END
 GO

This code work on the third part.
3) Example of WHILE Loop with CONTINUE and BREAK keywords
 
1
2
3
5

it skip the 4 :p]]></description>
		<content:encoded><![CDATA[<p>DECLARE @intFlag INT<br />
 SET @intFlag = 1</p>
<p> WHILE (@intFlag &lt;=5) BEGIN<br />
  print @intflag</p>
<p> SET @intFlag = @intFlag + 1<br />
 IF @intFlag = 4<br />
 Set @intFlag = @intFlag + 1</p>
<p> END<br />
 GO</p>
<p>This code work on the third part.<br />
3) Example of WHILE Loop with CONTINUE and BREAK keywords</p>
<p>1<br />
2<br />
3<br />
5</p>
<p>it skip the 4 :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Sagen</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-144337</link>
		<dc:creator><![CDATA[George Sagen]]></dc:creator>
		<pubDate>Tue, 28 Jun 2011 05:16: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-144337</guid>
		<description><![CDATA[I receive a comma delimited text file from a trade partner that has three fields. The first contains a unique record ID, the second contains a series of one or more values called keycodes that are pipe delimited internally between each value within the field. Sometimes there is only one keycode value in the second field, and sometimes there are as many as a hundred. Additionally, the width of each value in the keycde field is inconsistent, ranging from 5 to 7 characters. The third field contains a number indicating how many values are in the internally pipe delimited keycode field. I need to import the data into a SQL Server table and flip the data so that I get one record for each combination of record ID and value in the second field. I&#039;m using an ODBC Text File driver to read the data. 

For example, I want the imported table that looks like this:

recordid, keycode, multiples
100001, AAA100&#124;AAA101&#124;AAA102, 3
100002, AAB100&#124;AAAB101, 2
100003, AAAA100&#124;AAB102&#124;AAAC100&#124;AAD100, 4

To look like:

recordid  keycode
100001   AAA100
100001   AAA101
100001   AAA102
100002   AAB100
100002   AAAB101
100003   AAAA100
100003   AAB102
100003   AAAC100
100003   AAD100

Thank you in advance for any help!]]></description>
		<content:encoded><![CDATA[<p>I receive a comma delimited text file from a trade partner that has three fields. The first contains a unique record ID, the second contains a series of one or more values called keycodes that are pipe delimited internally between each value within the field. Sometimes there is only one keycode value in the second field, and sometimes there are as many as a hundred. Additionally, the width of each value in the keycde field is inconsistent, ranging from 5 to 7 characters. The third field contains a number indicating how many values are in the internally pipe delimited keycode field. I need to import the data into a SQL Server table and flip the data so that I get one record for each combination of record ID and value in the second field. I&#8217;m using an ODBC Text File driver to read the data. </p>
<p>For example, I want the imported table that looks like this:</p>
<p>recordid, keycode, multiples<br />
100001, AAA100|AAA101|AAA102, 3<br />
100002, AAB100|AAAB101, 2<br />
100003, AAAA100|AAB102|AAAC100|AAD100, 4</p>
<p>To look like:</p>
<p>recordid  keycode<br />
100001   AAA100<br />
100001   AAA101<br />
100001   AAA102<br />
100002   AAB100<br />
100002   AAAB101<br />
100003   AAAA100<br />
100003   AAB102<br />
100003   AAAC100<br />
100003   AAD100</p>
<p>Thank you in advance for any help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayaprakash</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-139656</link>
		<dc:creator><![CDATA[Jayaprakash]]></dc:creator>
		<pubDate>Wed, 08 Jun 2011 07:31:35 +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-139656</guid>
		<description><![CDATA[Hello Sir,
               Thank you for your post. Its very useful.]]></description>
		<content:encoded><![CDATA[<p>Hello Sir,<br />
               Thank you for your post. Its very useful.</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-136799</link>
		<dc:creator><![CDATA[priya]]></dc:creator>
		<pubDate>Thu, 26 May 2011 11:45:32 +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-136799</guid>
		<description><![CDATA[Hello Sir,
whenever i am stuck in sql problems i always refer your articles, it has always helped me. 

thanks for sharing ur knowledge with everyone.
Great admirer,
Priya]]></description>
		<content:encoded><![CDATA[<p>Hello Sir,<br />
whenever i am stuck in sql problems i always refer your articles, it has always helped me. </p>
<p>thanks for sharing ur knowledge with everyone.<br />
Great admirer,<br />
Priya</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-135367</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Fri, 20 May 2011 03:24:20 +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-135367</guid>
		<description><![CDATA[Jason

Can you please post, your required output format.

Its very difficult to understand.

~IM.]]></description>
		<content:encoded><![CDATA[<p>Jason</p>
<p>Can you please post, your required output format.</p>
<p>Its very difficult to understand.</p>
<p>~IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Rai</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-135304</link>
		<dc:creator><![CDATA[Jason Rai]]></dc:creator>
		<pubDate>Thu, 19 May 2011 18:40:35 +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-135304</guid>
		<description><![CDATA[Hey,

I was wondering if you had a bulk insert todo could you use a while loop if the data was all ints and had a pattern.

c1  c2  c3

1---1---x
2---1---x
3---1---x
4---1---x
5---1---x
6---1---x
1---2---x
2---2---x
3---2---x

ect...

every 6 rows. Also x is a boolean where if c2 &gt;= c1, x = true. 

So can i nest an if(for x) in a while in a while?

Usually i would use a for loop.

ps. this is to populate a new empty tabel.]]></description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>I was wondering if you had a bulk insert todo could you use a while loop if the data was all ints and had a pattern.</p>
<p>c1  c2  c3</p>
<p>1&#8212;1&#8212;x<br />
2&#8212;1&#8212;x<br />
3&#8212;1&#8212;x<br />
4&#8212;1&#8212;x<br />
5&#8212;1&#8212;x<br />
6&#8212;1&#8212;x<br />
1&#8212;2&#8212;x<br />
2&#8212;2&#8212;x<br />
3&#8212;2&#8212;x</p>
<p>ect&#8230;</p>
<p>every 6 rows. Also x is a boolean where if c2 &gt;= c1, x = true. </p>
<p>So can i nest an if(for x) in a while in a while?</p>
<p>Usually i would use a for loop.</p>
<p>ps. this is to populate a new empty tabel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pink lady</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-135281</link>
		<dc:creator><![CDATA[Pink lady]]></dc:creator>
		<pubDate>Thu, 19 May 2011 16:20:38 +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-135281</guid>
		<description><![CDATA[hello , 
i need to write a funtion that shows , by book name show me the author name.
could u plz help me.]]></description>
		<content:encoded><![CDATA[<p>hello ,<br />
i need to write a funtion that shows , by book name show me the author name.<br />
could u plz help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohd Javed Akhtar</title>
		<link>http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/#comment-130154</link>
		<dc:creator><![CDATA[Mohd Javed Akhtar]]></dc:creator>
		<pubDate>Wed, 20 Apr 2011 11:53:04 +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-130154</guid>
		<description><![CDATA[I need complete information]]></description>
		<content:encoded><![CDATA[<p>I need complete information</p>
]]></content:encoded>
	</item>
</channel>
</rss>

