<?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/"
	
	>
<channel>
	<title>
	Comments on: SQL Puzzle: SQL Advance Query &#8211; Skip the first set of Zeros	</title>
	<atom:link href="https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-skip-the-first-set-of-zeros/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-skip-the-first-set-of-zeros/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Thu, 02 Apr 2020 07:48:12 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>
		By: abhishek		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-skip-the-first-set-of-zeros/#comment-8191</link>

		<dc:creator><![CDATA[abhishek]]></dc:creator>
		<pubDate>Thu, 02 Apr 2020 07:48:12 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6648#comment-8191</guid>

					<description><![CDATA[I was trying to solve this without using any inbuilt function, say if you were to solve this in mysql then how to go about it.]]></description>
			<content:encoded><![CDATA[<p>I was trying to solve this without using any inbuilt function, say if you were to solve this in mysql then how to go about it.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rajib		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-skip-the-first-set-of-zeros/#comment-6931</link>

		<dc:creator><![CDATA[Rajib]]></dc:creator>
		<pubDate>Mon, 25 Mar 2019 12:27:26 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6648#comment-6931</guid>

					<description><![CDATA[We can use offset also anf fetch next.]]></description>
			<content:encoded><![CDATA[<p>We can use offset also anf fetch next.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bhavin Katrodiya		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-skip-the-first-set-of-zeros/#comment-6018</link>

		<dc:creator><![CDATA[Bhavin Katrodiya]]></dc:creator>
		<pubDate>Thu, 16 Nov 2017 13:57:54 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6648#comment-6018</guid>

					<description><![CDATA[SELECT 
	num 
FROM (
	SELECT   
		num,	
		SUM(num) OVER(ORDER BY %%PhysLoc%% ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS Col2
	FROM 
		tbl_ids 
		) Data
WHERE Col2&#062;0]]></description>
			<content:encoded><![CDATA[<p>SELECT<br />
	num<br />
FROM (<br />
	SELECT<br />
		num,<br />
		SUM(num) OVER(ORDER BY %%PhysLoc%% ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS Col2<br />
	FROM<br />
		tbl_ids<br />
		) Data<br />
WHERE Col2&gt;0</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dinesh.IS		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-skip-the-first-set-of-zeros/#comment-5929</link>

		<dc:creator><![CDATA[Dinesh.IS]]></dc:creator>
		<pubDate>Mon, 16 Oct 2017 07:57:37 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6648#comment-5929</guid>

					<description><![CDATA[Declare @Values As VarChar(Max),@XML As XML;
Set @Values=&#039;&#039;
Select @Values+=+&#039;,&#039;+Convert(VarChar(50),Num) From (Select Num From TBL_IDS) A 
Set @Values=Right(@Values,PatIndex(&#039;%[1-9]%&#039;,@Values)-1)
Set @XML=&#039;&#039;+Replace(@Values,&#039;,&#039;,&#039;&#039;)+&#039;&#039;
Select r.value(&#039;.&#039;,&#039;NvarChar(Max)&#039;) As Item
From @XML.nodes(&#039;t&#039;) as records(r)]]></description>
			<content:encoded><![CDATA[<p>Declare @Values As VarChar(Max),@XML As XML;<br />
Set @Values=&#8221;<br />
Select @Values+=+&#8217;,&#8217;+Convert(VarChar(50),Num) From (Select Num From TBL_IDS) A<br />
Set @Values=Right(@Values,PatIndex(&#8216;%[1-9]%&#8217;,@Values)-1)<br />
Set @XML=&#8221;+Replace(@Values,&#8217;,&#8217;,&#8221;)+&#8221;<br />
Select r.value(&#8216;.&#8217;,&#8217;NvarChar(Max)&#8217;) As Item<br />
From @XML.nodes(&#8216;t&#8217;) as records(r)</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
