<?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; Split the String and generate count of Each part	</title>
	<atom:link href="https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Wed, 12 Sep 2018 10:27:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>
		By: ankush g		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/#comment-6689</link>

		<dc:creator><![CDATA[ankush g]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 10:27:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6177#comment-6689</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/#comment-5953&quot;&gt;Dinesh.IS&lt;/a&gt;.

Select NAME, count(NAME) from (
Select DISTINCT
trim(regexp_substr(str1, &#039;[^;]+&#039;, 1, level)) Name, level
FROM tbl_SplitData
connect by regexp_substr(name, &#039;[^;]+&#039;, 1, level) is not null)foo
GROUP BY NAME]]></description>
			<content:encoded><![CDATA[<p>Select NAME, count(NAME) from (<br />
Select DISTINCT<br />
trim(regexp_substr(str1, &#8216;[^;]+&#8217;, 1, level)) Name, level<br />
FROM tbl_SplitData<br />
connect by regexp_substr(name, &#8216;[^;]+&#8217;, 1, level) is not null)foo<br />
GROUP BY NAME</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ankush		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/#comment-6688</link>

		<dc:creator><![CDATA[Ankush]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 10:26:07 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6177#comment-6688</guid>

					<description><![CDATA[Select NAME, count(NAME) from (
Select DISTINCT
trim(regexp_substr(str1, &#039;[^;]+&#039;, 1, level)) Name, level
FROM tbl_SplitData
connect by regexp_substr(name, &#039;[^;]+&#039;, 1, level) is not null)foo
GROUP BY NAME]]></description>
			<content:encoded><![CDATA[<p>Select NAME, count(NAME) from (<br />
Select DISTINCT<br />
trim(regexp_substr(str1, &#8216;[^;]+&#8217;, 1, level)) Name, level<br />
FROM tbl_SplitData<br />
connect by regexp_substr(name, &#8216;[^;]+&#8217;, 1, level) is not null)foo<br />
GROUP BY NAME</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ankush		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/#comment-6687</link>

		<dc:creator><![CDATA[Ankush]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 10:25:06 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6177#comment-6687</guid>

					<description><![CDATA[What do u say about this?

Select NAME, count(NAME) from (
Select DISTINCT
trim(regexp_substr(str1, &#039;[^;]+&#039;, 1, level)) Name, level
FROM tbl_SplitData
connect by regexp_substr(name, &#039;[^;]+&#039;, 1, level) is not null)foo
GROUP BY NAME]]></description>
			<content:encoded><![CDATA[<p>What do u say about this?</p>
<p>Select NAME, count(NAME) from (<br />
Select DISTINCT<br />
trim(regexp_substr(str1, &#8216;[^;]+&#8217;, 1, level)) Name, level<br />
FROM tbl_SplitData<br />
connect by regexp_substr(name, &#8216;[^;]+&#8217;, 1, level) is not null)foo<br />
GROUP BY NAME</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dinesh.IS		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/#comment-5953</link>

		<dc:creator><![CDATA[Dinesh.IS]]></dc:creator>
		<pubDate>Tue, 24 Oct 2017 04:55:50 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6177#comment-5953</guid>

					<description><![CDATA[Declare @SplitDetails Table(StringValue VarChar(5000));
Declare @StringValue VarChar(5000)=&#039;&#039;,@Len As Int

Select @StringValue+=&#039;;&#039;+Str1 From (Select Str1 From TBL_SplitData ) A 
Set @StringValue=STUFF(@StringValue,1,1,&#039;&#039;)

While Len(@StringValue)&#062;0
Begin

		Set @Len=(Case CharIndex(&#039;;&#039;,@StringValue) When 0 Then Len(@StringValue) Else CharIndex(&#039;;&#039;,@StringValue)-1 End)

		Insert Into @SplitDetails
		(StringValue)
		Values(SubString(@StringValue,1,@Len))

		Set @StringValue=(Case Len(@StringValue)-@Len When 0 Then Null Else Right(@StringValue,Len(@StringValue)-@Len-1) End)

End

Select StringValue,Count(*) As StringCounts From @SplitDetails 
Group By StringValue]]></description>
			<content:encoded><![CDATA[<p>Declare @SplitDetails Table(StringValue VarChar(5000));<br />
Declare @StringValue VarChar(5000)=&#8221;,@Len As Int</p>
<p>Select @StringValue+=&#8217;;&#8217;+Str1 From (Select Str1 From TBL_SplitData ) A<br />
Set @StringValue=STUFF(@StringValue,1,1,&#8221;)</p>
<p>While Len(@StringValue)&gt;0<br />
Begin</p>
<p>		Set @Len=(Case CharIndex(&#8216;;&#8217;,@StringValue) When 0 Then Len(@StringValue) Else CharIndex(&#8216;;&#8217;,@StringValue)-1 End)</p>
<p>		Insert Into @SplitDetails<br />
		(StringValue)<br />
		Values(SubString(@StringValue,1,@Len))</p>
<p>		Set @StringValue=(Case Len(@StringValue)-@Len When 0 Then Null Else Right(@StringValue,Len(@StringValue)-@Len-1) End)</p>
<p>End</p>
<p>Select StringValue,Count(*) As StringCounts From @SplitDetails<br />
Group By StringValue</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dinesh.IS		</title>
		<link>https://www.dbrnd.com/2017/10/sql-puzzle-sql-advance-query-split-the-string-and-generate-count-of-each-part/#comment-5952</link>

		<dc:creator><![CDATA[Dinesh.IS]]></dc:creator>
		<pubDate>Tue, 24 Oct 2017 04:55:17 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6177#comment-5952</guid>

					<description><![CDATA[Declare @SplitDetails Table(StringValue VarChar(5000));
Declare @StringValue VarChar(5000),@Len As Int
Declare Cur Cursor For Select Str1 From TBL_SplitData 
Open Cur
Fetch Next From Cur Into @StringValue 
While @@Fetch_Status=0
Begin 

					While Len(@StringValue)&#062;0
					Begin

							Set @Len=(Case CharIndex(&#039;;&#039;,@StringValue) When 0 Then Len(@StringValue) Else CharIndex(&#039;;&#039;,@StringValue)-1 End)

							Insert Into @SplitDetails
							(StringValue)
							Values(SubString(@StringValue,1,@Len))

							Set @StringValue=(Case Len(@StringValue)-@Len When 0 Then Null Else Right(@StringValue,Len(@StringValue)-@Len-1) End)
					End
Fetch Next From Cur Into @StringValue
End
CLose Cur
Deallocate Cur

Select StringValue,Count(*) As StringCounts From @SplitDetails 
Group By StringValue]]></description>
			<content:encoded><![CDATA[<p>Declare @SplitDetails Table(StringValue VarChar(5000));<br />
Declare @StringValue VarChar(5000),@Len As Int<br />
Declare Cur Cursor For Select Str1 From TBL_SplitData<br />
Open Cur<br />
Fetch Next From Cur Into @StringValue<br />
While @@Fetch_Status=0<br />
Begin </p>
<p>					While Len(@StringValue)&gt;0<br />
					Begin</p>
<p>							Set @Len=(Case CharIndex(&#8216;;&#8217;,@StringValue) When 0 Then Len(@StringValue) Else CharIndex(&#8216;;&#8217;,@StringValue)-1 End)</p>
<p>							Insert Into @SplitDetails<br />
							(StringValue)<br />
							Values(SubString(@StringValue,1,@Len))</p>
<p>							Set @StringValue=(Case Len(@StringValue)-@Len When 0 Then Null Else Right(@StringValue,Len(@StringValue)-@Len-1) End)<br />
					End<br />
Fetch Next From Cur Into @StringValue<br />
End<br />
CLose Cur<br />
Deallocate Cur</p>
<p>Select StringValue,Count(*) As StringCounts From @SplitDetails<br />
Group By StringValue</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
