<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UC&#039;s Corner &#187; sql</title>
	<atom:link href="http://yussi.nl/index.php/category/sql/feed" rel="self" type="application/rss+xml" />
	<link>http://yussi.nl</link>
	<description>Yussi Ariefiyono</description>
	<lastBuildDate>Fri, 25 Jun 2010 12:57:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Finding Duplicates with SQL</title>
		<link>http://yussi.nl/index.php/finding-duplicates-with-sql.html</link>
		<comments>http://yussi.nl/index.php/finding-duplicates-with-sql.html#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:39:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">/post/Finding-Duplicates-with-SQL.aspx</guid>
		<description><![CDATA[problem:finding the duplicate within sql
solution:provide table named&#160;subscriber, with elements: email
SELECT COUNT(DISTINCT email) AS NumberOfEmail, email FROM subscriber GROUP BY email HAVING (COUNT(email) &#62; 1)
]]></description>
			<content:encoded><![CDATA[<p><strong>problem:</strong><br />finding the duplicate within sql</p>
<p><strong>solution:</strong><br />provide table named&nbsp;subscriber, with elements: email</p>
<p>SELECT COUNT(DISTINCT email) AS NumberOfEmail, email FROM subscriber GROUP BY email HAVING (COUNT(email) &gt; 1)</p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/finding-duplicates-with-sql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>select NOT in top post sql query</title>
		<link>http://yussi.nl/index.php/select-not-in-top-post-sql-query.html</link>
		<comments>http://yussi.nl/index.php/select-not-in-top-post-sql-query.html#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:26:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">/post/select-NOT-in-top-post-sql-query.aspx</guid>
		<description><![CDATA[problem:make some selection in database OTHER THEN top (10) post
solution:&#160;&#160;provide, table named news with element: newsID, newsDate
SELECT * FROM News WHERE (newsID NOT IN (SELECT TOP (10) newsID FROM News AS News_1 ORDER BY newsDate DESC)) ORDER BY newsDate DESC&#160;
&#160;
it will return all post except top&#160;10&#160;post&#160;
]]></description>
			<content:encoded><![CDATA[<p><strong>problem:</strong><br />make some selection in database OTHER THEN top (10) post</p>
<p><strong>solution:&nbsp;<span class="Apple-style-span" style="font-weight: normal">&nbsp;<br />provide, table named news with element: newsID, newsDate</p>
<p>SELECT * FROM News WHERE (newsID </span>NOT IN<span class="Apple-style-span" style="font-weight: normal"> (SELECT TOP (10) newsID FROM News AS News_1 ORDER BY newsDate DESC)) ORDER BY newsDate DESC&nbsp;</span></strong></p>
<p>&nbsp;</p>
<p>it will return all post except top&nbsp;10&nbsp;post&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/select-not-in-top-post-sql-query.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>calculating age in sql</title>
		<link>http://yussi.nl/index.php/calculating-age-in-sql.html</link>
		<comments>http://yussi.nl/index.php/calculating-age-in-sql.html#comments</comments>
		<pubDate>Mon, 03 Aug 2009 17:38:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">/post/calculating-age-in-sql.aspx</guid>
		<description><![CDATA[
problem:
display age with sql command


solution:
sql command:
SELECT&#160;&#160;&#160;&#160; DATEDIFF(mm, dateOfBirth, GETDATE()) / 12 AS age
FROM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; someTable
it wil display age ^^V
]]></description>
			<content:encoded><![CDATA[<p>
<strong>problem:</strong><br />
display age with sql command
</p>
<p>
<strong>solution:</strong><br />
sql command:<br />
SELECT&nbsp;&nbsp;&nbsp;&nbsp; DATEDIFF(mm, dateOfBirth, GETDATE()) / 12 AS age<br />
FROM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; someTable</p>
<p>it wil display age ^^V</p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/calculating-age-in-sql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>birthday reminder list  asp.net</title>
		<link>http://yussi.nl/index.php/birthday-reminder-list-asp-net.html</link>
		<comments>http://yussi.nl/index.php/birthday-reminder-list-asp-net.html#comments</comments>
		<pubDate>Mon, 03 Aug 2009 15:55:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">/post/birthday-reminder-list--aspnet.aspx</guid>
		<description><![CDATA[problem:

displaying list of bday boy/girl in next (30/ according to your own choice ) days from the current date.


solution:
im using the sql to select the date of birth, for displaying, you can use whatever you want, like gridview, datalist etc.


hereby the sql command:


SELECT&#160;&#160;&#160;&#160; DateOfBirth
FROM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; someTablename
WHERE&#160;&#160;&#160;&#160; (DateOfBirth &#60; GETDATE()) AND (DATEDIFF(d, GETDATE(), DATEADD(yy, DATEDIFF(yy, DateOfBirth, GETDATE()), <a href="http://yussi.nl/index.php/birthday-reminder-list-asp-net.html" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>problem:</strong></p>
<p>
displaying list of bday boy/girl in next (30/ according to your own choice ) days from the current date.
</p>
<p>
<strong>solution:</strong><br />
im using the sql to select the date of birth, for displaying, you can use whatever you want, like gridview, datalist etc.
</p>
<p>
hereby the sql command:
</p>
<p>
<em>SELECT&nbsp;&nbsp;&nbsp;&nbsp; DateOfBirth<br />
FROM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; someTablename<br />
WHERE&nbsp;&nbsp;&nbsp;&nbsp; (DateOfBirth &lt; GETDATE()) AND (DATEDIFF(d, GETDATE(), DATEADD(yy, DATEDIFF(yy, DateOfBirth, GETDATE()), DateOfBirth)) BETWEEN<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 AND 30) </em>
</p>
<p>
it will return the list of date of birth from the current date.
</p>
<p>
for reference of the sql command:<br />
<a href="http://msdn.microsoft.com/en-us/library/aa258269%28SQL.80%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/aa258269%28SQL.80%29.aspx</a>
</p>
<p>
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/birthday-reminder-list-asp-net.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELECT next, last row  or &#8220;LIMIT-command&#8221; in MSSQL</title>
		<link>http://yussi.nl/index.php/select-next-last-row-or-limit-command-in-mssql.html</link>
		<comments>http://yussi.nl/index.php/select-next-last-row-or-limit-command-in-mssql.html#comments</comments>
		<pubDate>Tue, 26 May 2009 16:07:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">/post/SELECT-next-last-row-or-LIMIT-command-in-MSSQL.aspx</guid>
		<description><![CDATA[
SELECT previous row or &#34;LIMIT-command&#34; in MSSQL


SELECT TOP (1) FROM table_name WHERE (ID&#60; @ID)
ORDER BY ID DESC


&#160;


SELECT next row or &#34;LIMIT-command&#34; in MSSQL


SELECT TOP (1) FROM table_name WHERE (ID&#62; @ID)
ORDER BY ID


&#160;


Thank also for the descussion&#160;
]]></description>
			<content:encoded><![CDATA[<p>
<strong>SELECT previous </strong><strong>row or &quot;LIMIT-command&quot; in MSSQL</strong>
</p>
<p>
SELECT TOP (1) FROM table_name WHERE (ID&lt; @ID)<br />
ORDER BY ID DESC
</p>
<p>
&nbsp;
</p>
<p>
<strong>SELECT next row or &quot;LIMIT-command&quot; in MSSQL</strong>
</p>
<p>
SELECT TOP (1) FROM table_name WHERE (ID&gt; @ID)<br />
ORDER BY ID
</p>
<p>
&nbsp;
</p>
<p>
<a rel="http://www.andys-sundaypink.com/blog/techy/" href="http://www.andys-sundaypink.com/blog/techy/" target="_blank" title="http://www.andys-sundaypink.com/blog/techy/">Thank </a>also for the descussion&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/select-next-last-row-or-limit-command-in-mssql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
