<?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>crusy.net &#187; Gruppieren</title>
	<atom:link href="http://blog.crusy.net/tag/gruppieren/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.crusy.net</link>
	<description>- Established 1979 -</description>
	<lastBuildDate>Thu, 09 Feb 2012 20:46:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SQL: Custom Order</title>
		<link>http://blog.crusy.net/2009/06/10/sql-custom-order/</link>
		<comments>http://blog.crusy.net/2009/06/10/sql-custom-order/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:55:15 +0000</pubDate>
		<dc:creator>crusy</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CASE]]></category>
		<category><![CDATA[Gruppieren]]></category>
		<category><![CDATA[Gruppierung]]></category>
		<category><![CDATA[ORDER]]></category>
		<category><![CDATA[Sortieren]]></category>
		<category><![CDATA[Sortierung]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.crusy.net/?p=764</guid>
		<description><![CDATA[Normalerweise sortiert man Datensätze alphabetisch oder numerisch oder so. Will man eine bestimmte Gruppe von Datensätzen (z.B. alle mit category 4) ganz oben sehen (statt an vierter Stelle), so nutze man CASE: ORDER BY CASE WHEN category=4 THEN 1 ELSE 2 END Das Ganze macht, dass die Datensätze in zwei Kategorien eingeteilt werden, nämlich &#8220;1&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>Normalerweise sortiert man Datensätze alphabetisch oder numerisch oder so. Will man eine bestimmte Gruppe von Datensätzen (z.B. alle mit category 4) ganz oben sehen (statt an vierter Stelle), so nutze man CASE:</p>
<blockquote><p>ORDER BY CASE WHEN category=4 THEN 1 ELSE 2 END</p></blockquote>
<p>Das Ganze macht, dass die Datensätze in zwei Kategorien eingeteilt werden, nämlich &#8220;1&#8243; und &#8220;2&#8243;. Nach diesen wird (vor-)sortiert, jede weitere Sortierung erfolgt dann innerhalb dieser Kategorien.</p>
<p>HTH</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crusy.net/2009/06/10/sql-custom-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

