<?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>Le Blog SQL Server d&#039;ElSüket &#187; T-SQL</title>
	<atom:link href="https://blog.developpez.com/elsuket/ptag/t-sql/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/elsuket</link>
	<description>Nicolas Souquet - Expert SQL Server</description>
	<lastBuildDate>Mon, 05 Apr 2021 07:32:41 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>La clause VALUES n&#8217;est-elle réservée qu&#8217;à l&#8217;ordre INSERT ?</title>
		<link>https://blog.developpez.com/elsuket/p11988/t-sql/la-clause-values-nest-elle-reservee-qua-lordre-insert</link>
		<comments>https://blog.developpez.com/elsuket/p11988/t-sql/la-clause-values-nest-elle-reservee-qua-lordre-insert#comments</comments>
		<pubDate>Sat, 25 May 2013 12:21:25 +0000</pubDate>
		<dc:creator><![CDATA[elsuket]]></dc:creator>
				<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[DELETE]]></category>
		<category><![CDATA[INSERT]]></category>
		<category><![CDATA[MAX]]></category>
		<category><![CDATA[MERGE]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[UPDATE]]></category>
		<category><![CDATA[VALUES]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/elsuket/?p=376</guid>
		<description><![CDATA[Si je pose la question, c&#8217;est que la réponse est &#8230; non, et ce depuis SQL Server 2008 ! En effet l&#8217;utilisation la plus commune de la clause VALUES se fait lors de la définition d&#8217;un ordre INSERT, et permettait &#8230; <a href="https://blog.developpez.com/elsuket/p11988/t-sql/la-clause-values-nest-elle-reservee-qua-lordre-insert">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Si je pose la question, c&rsquo;est que la réponse est &#8230; non, et ce depuis SQL Server 2008 !</p>
<p>En effet l&rsquo;utilisation la plus commune de la clause VALUES se fait lors de la définition d&rsquo;un ordre INSERT, et permettait jusqu&rsquo;à SQL Server 2005 inclus d&rsquo;insérer seulement une ligne dans une table.</p>
<p>Cela a changé lors de la sortie de SQL Server 2008, qui permet de réaliser un INSERT d&rsquo;au plus 1000 lignes dont les valeurs sont codées &laquo;&nbsp;en dur&nbsp;&raquo; dans un script. Voyons les autres utilisations possible de cette clause &#8230;<br />
<span id="more-376"></span></p>
<p>En fait, cette clause est utilisable pour toute instruction DML, pour peu qu&rsquo;on la précise dans la clause FROM d&rsquo;une instruction SELECT, INSERT, UPDATE ou DELETE, et dans la clause USING de l&rsquo;instruction MERGE.</p>
<p>Voici quelques exemples simples d&rsquo;utilisation, qui éveilleront votre imagination dès que vous retournerez à vos claviers.<br />
Commençons par appréhender la clause avec une requête triviale :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">SELECT</span>&nbsp; <span style="color: #808080;">*</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">-</span><span style="color: #000;">15</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">1</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">2</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">3</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> V<span style="color: #808080;">&#40;</span>i<span style="color: #808080;">&#41;</span></div></td></tr></tbody></table></div>
<p>Ce qui nous retourne le résultat suivant :</p>
<p><img src="http://img835.imageshack.us/img835/6108/values01.png" alt="" /></p>
<p>Si nous regardons le plan d&rsquo;exécution à l&rsquo;aide de <a href="http://blog.developpez.com/elsuket/p10724/utilitaires/sql_sentry_plan_explorer">SQL Sentry Plan Explorer</a>, on voit que l&rsquo;estimation de cardinalité se fait proprement :</p>
<p><img src="http://img51.imageshack.us/img51/5177/values02.png" alt="" /></p>
<p>Ceci évite d&rsquo;écrire une requête avec de nombreux UNION ALL, comme suit :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">SELECT</span>&nbsp; <span style="color: #808080;">*</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">-</span><span style="color: #000;">15</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">UNION</span> <span style="color: #808080;">ALL</span> <span style="color: #0000FF;">SELECT</span> <span style="color: #000;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">UNION</span> <span style="color: #808080;">ALL</span> <span style="color: #0000FF;">SELECT</span> <span style="color: #000;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">UNION</span> <span style="color: #808080;">ALL</span> <span style="color: #0000FF;">SELECT</span> <span style="color: #000;">2</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">UNION</span> <span style="color: #808080;">ALL</span> <span style="color: #0000FF;">SELECT</span> <span style="color: #000;">3</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> V<span style="color: #808080;">&#40;</span>i<span style="color: #808080;">&#41;</span></div></td></tr></tbody></table></div>
<p>Même si l&rsquo;estimation de cardinalité se fait de la même manière.</p>
<p>On peut donc spécifier un INSERT de plusieurs lignes à l&rsquo;aide de la clause VALUES :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">DECLARE</span> @pays_capitale <span style="color: #0000FF;">TABLE</span><br />
<span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; pays <span style="color: #0000FF;">varchar</span><span style="color: #808080;">&#40;</span><span style="color: #000;">15</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , capitale <span style="color: #0000FF;">varchar</span><span style="color: #808080;">&#40;</span><span style="color: #000;">32</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span><br />
<span style="color: #808080;">&#41;</span><br />
<br />
<span style="color: #0000FF;">INSERT</span>&nbsp; <span style="color: #0000FF;">INTO</span> @pays_capitale<br />
<span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; pays<br />
&nbsp; &nbsp; &nbsp; &nbsp; , capitale<br />
<span style="color: #808080;">&#41;</span><br />
<span style="color: #0000FF;">VALUES</span>&nbsp; <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'France'</span>, <span style="color: #FF0000;">'Paris'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Thaïlande'</span>, <span style="color: #FF0000;">'Bangkok'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Bouthan'</span>, <span style="color: #FF0000;">'Thimphou'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Vanuatu'</span>, <span style="color: #FF0000;">'Port-Vila'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Singapour'</span>, <span style="color: #FF0000;">'Singapour'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Viêt Nam'</span>, <span style="color: #FF0000;">'Hanoï'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Cambodge'</span>, <span style="color: #FF0000;">'Phnom Penh'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Laos'</span>, <span style="color: #FF0000;">'Vientiane'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Malaisie'</span>, <span style="color: #FF0000;">'Kuala Lumpur'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Brunei'</span>, <span style="color: #FF0000;">'Bandar Seri Begawan'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Philippines'</span>, <span style="color: #FF0000;">'Manille'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Indonésie'</span>, <span style="color: #FF0000;">'Jakarta'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Birmanie'</span>, <span style="color: #FF0000;">'Naypyidaw'</span><span style="color: #808080;">&#41;</span><br />
<br />
<span style="color: #0000FF;">SELECT</span>&nbsp; <span style="color: #808080;">*</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; @pays_capitale</div></td></tr></tbody></table></div>
<p>Nous obtenons le résultat suivant :</p>
<p><img src="http://img713.imageshack.us/img713/5703/values03.png" alt="" /></p>
<p>La démonstration des exemples suivants, nous utilisons le jeu de données défini par le lot de requêtes ci-dessous :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> capteur<br />
<span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; capteur_id <span style="color: #0000FF;">tinyint</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span> <span style="color: #0000FF;">IDENTITY</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">0</span>, <span style="color: #000;">1</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">CONSTRAINT</span> PK_capteur <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , capteur_nom <span style="color: #0000FF;">varchar</span><span style="color: #808080;">&#40;</span><span style="color: #000;">15</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">CONSTRAINT</span> UQ_capteur <span style="color: #0000FF;">UNIQUE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , capteur_date_ajout <span style="color: #0000FF;">datetime</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span> <span style="color: #0000FF;">CONSTRAINT</span> DF_capteur__capteur_date_ajout <span style="color: #0000FF;">DEFAULT</span> <span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">GETDATE</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span><br />
<span style="color: #808080;">&#41;</span><br />
GO<br />
<br />
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> mesure<br />
<span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; mesure_id <span style="color: #0000FF;">int</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">-</span><span style="color: #000;">2147483648</span>, <span style="color: #000;">1</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">CONSTRAINT</span> PK_mesure <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , capteur_id <span style="color: #0000FF;">tinyint</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">CONSTRAINT</span> FK_mesure__capteur_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">FOREIGN</span> <span style="color: #0000FF;">KEY</span> <span style="color: #808080;">&#40;</span>capteur_id<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">REFERENCES</span> dbo.<span style="color: #202020;">capteur</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , mesure_date_time <span style="color: #0000FF;">datetime</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">CONSTRAINT</span> DF_mesure_mesure_date_time <span style="color: #0000FF;">DEFAULT</span> <span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">GETDATE</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , valeur <span style="color: #0000FF;">tinyint</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span><br />
<span style="color: #808080;">&#41;</span><br />
GO<br />
<br />
<span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> dbo.<span style="color: #202020;">capteur</span><br />
<span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; capteur_nom<br />
<span style="color: #808080;">&#41;</span><br />
<span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 1'</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 2'</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 3'</span><span style="color: #808080;">&#41;</span><br />
GO<br />
<br />
<span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> dbo.<span style="color: #202020;">mesure</span><br />
<span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; capteur_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; , valeur<br />
<span style="color: #808080;">&#41;</span><br />
<span style="color: #0000FF;">SELECT</span>&nbsp; <span style="color: #FF00FF;">ABS</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">CHECKSUM</span><span style="color: #808080;">&#40;</span>NEWID<span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">%</span> <span style="color: #000;">3</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #FF00FF;">ABS</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">CHECKSUM</span><span style="color: #808080;">&#40;</span>NEWID<span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">%</span> <span style="color: #000;">256</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; master.<span style="color: #202020;">dbo</span>.<span style="color: #202020;">spt_values</span><br />
<span style="color: #0000FF;">WHERE</span> &nbsp; type <span style="color: #808080;">=</span> <span style="color: #FF0000;">'P'</span><br />
GO <span style="color: #000;">50</span></div></td></tr></tbody></table></div>
<p>La vue master.dbo.spt_values retourne 2048 lignes qui ont pour type &laquo;&nbsp;P&nbsp;&raquo; : la table <em>dbo.mesure</em> contient donc 2048 * 50 = 102.400 lignes.</p>
<p>Étant donné que la clause se comporte de la même façon qu&rsquo;une table dérivée, on peut tout à fait l&rsquo;utiliser pour réaliser une jointure.<br />
Essayons de classer les mesures par fourchettes :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">SELECT</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BUCKET.<span style="color: #202020;">low_bound</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , BUCKET.<span style="color: #202020;">high_bound</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #FF00FF;">COUNT</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">*</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> occurences<br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbo.<span style="color: #202020;">mesure</span> <span style="color: #0000FF;">AS</span> M<br />
<span style="color: #0000FF;">INNER</span> <span style="color: #808080;">JOIN</span>&nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">0</span>, <span style="color: #000;">5</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">5</span>, <span style="color: #000;">10</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">10</span>, <span style="color: #000;">15</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">15</span>, <span style="color: #000;">20</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">20</span>, <span style="color: #000;">30</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #000;">30</span>, <span style="color: #000;">40</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">40</span>, <span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">50</span>, <span style="color: #000;">100</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">100</span>, <span style="color: #000;">200</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #000;">200</span>, <span style="color: #000;">1000</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> BUCKET<span style="color: #808080;">&#40;</span>low_bound, high_bound<span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">ON</span> M.<span style="color: #202020;">valeur</span> <span style="color: #808080;">&amp;</span>gt;<span style="color: #808080;">=</span> BUCKET.<span style="color: #202020;">low_bound</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">AND</span> M.<span style="color: #202020;">valeur</span> <span style="color: #808080;">&amp;</span>lt; BUCKET.<span style="color: #202020;">high_bound</span><br />
<span style="color: #0000FF;">GROUP</span> <span style="color: #0000FF;">BY</span>&nbsp; &nbsp; &nbsp; &nbsp; BUCKET.<span style="color: #202020;">low_bound</span>, BUCKET.<span style="color: #202020;">high_bound</span><br />
<span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span>&nbsp; &nbsp; &nbsp; &nbsp; BUCKET.<span style="color: #202020;">low_bound</span>, BUCKET.<span style="color: #202020;">high_bound</span></div></td></tr></tbody></table></div>
<p>Ce qui nous retourne :</p>
<p><img src="http://img845.imageshack.us/img845/7702/values04.png" alt="" /></p>
<p>Voyons le cas d&rsquo;un UPDATE :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">WITH</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; BUCKET <span style="color: #808080;">&#40;</span>low_bound, high_bound<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">SELECT</span>&nbsp; <span style="color: #808080;">*</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">0</span>, <span style="color: #000;">5</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">5</span>, <span style="color: #000;">10</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #000;">10</span>, <span style="color: #000;">15</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">15</span>, <span style="color: #000;">20</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">20</span>, <span style="color: #000;">30</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> V<span style="color: #808080;">&#40;</span>low_bound, high_bound<span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span><br />
<span style="color: #0000FF;">UPDATE</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbo.<span style="color: #202020;">mesure</span><br />
<span style="color: #0000FF;">SET</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valeur <span style="color: #808080;">*=</span> <span style="color: #000;">2</span> <span style="color: #008080;">-- multiplie par deux la valeur mesurée</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbo.<span style="color: #202020;">mesure</span> <span style="color: #0000FF;">AS</span> M<br />
<span style="color: #0000FF;">INNER</span> <span style="color: #808080;">JOIN</span>&nbsp; &nbsp; &nbsp; BUCKET <span style="color: #0000FF;">AS</span> B<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">ON</span> B.<span style="color: #202020;">low_bound</span> &nbsp;M.<span style="color: #202020;">valeur</span></div></td></tr></tbody></table></div>
<p>Notez que rien ici n&rsquo;oblige à la construction d&rsquo;une expression de table commune : on peut tout à fait spécifier le constructeur de valeurs de table dans la clause INNER JOIN, comme nous l&rsquo;avons fait avec la requête précédente.</p>
<p>Si nous ré-exécutons la requête de classement par fourchettes, nous obtenons maintenant :</p>
<p><img src="http://img69.imageshack.us/img69/5861/values05.png" alt="" /></p>
<p>l&rsquo;instruction DELETE se décrit de manière similaire :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">DELETE</span> <span style="color: #0000FF;">FROM</span> &nbsp; &nbsp; dbo.<span style="color: #202020;">mesure</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbo.<span style="color: #202020;">mesure</span> <span style="color: #0000FF;">AS</span> M<br />
<span style="color: #0000FF;">INNER</span> <span style="color: #808080;">JOIN</span>&nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">VALUES</span> &nbsp;<span style="color: #808080;">&#40;</span><span style="color: #000;">30</span>, <span style="color: #000;">40</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">40</span>, <span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">50</span>, <span style="color: #000;">100</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #000;">100</span>, <span style="color: #000;">200</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #000;">200</span>, <span style="color: #000;">1000</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> BUCKET <span style="color: #808080;">&#40;</span>low_bound, high_bound<span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">ON</span> M.<span style="color: #202020;">valeur</span> <span style="color: #808080;">&amp;</span>gt;<span style="color: #808080;">=</span> BUCKET.<span style="color: #202020;">low_bound</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">AND</span> M.<span style="color: #202020;">valeur</span> <span style="color: #808080;">&amp;</span>lt; BUCKET.<span style="color: #202020;">high_bound</span></div></td></tr></tbody></table></div>
<p>Après ré-exécution de la requête de distribution des valeurs par plages, on voit que la table des mesures contient maintenant :</p>
<p><img src="http://img90.imageshack.us/img90/1578/values06.png" alt="" /></p>
<p>Terminons par l&rsquo;ordre MERGE, avec lequel nous allons ajouter des capteurs, ou marquer ceux qui existent déjà à la date courante :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">MERGE &nbsp; dbo.<span style="color: #202020;">capteur</span> <span style="color: #0000FF;">AS</span> TGT<br />
<span style="color: #0000FF;">USING</span> &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 1'</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 2'</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 3'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 4'</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 5'</span><span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Capteur 6'</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> SRC <span style="color: #808080;">&#40;</span>capteur_nom<span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">ON</span> TGT.<span style="color: #202020;">capteur_nom</span> <span style="color: #808080;">=</span> SRC.<span style="color: #202020;">capteur_nom</span><br />
<span style="color: #0000FF;">WHEN</span>&nbsp; &nbsp; MATCHED <span style="color: #0000FF;">THEN</span> <span style="color: #0000FF;">UPDATE</span> <span style="color: #0000FF;">SET</span> capteur_date_ajout <span style="color: #808080;">=</span> <span style="color: #FF00FF;">GETDATE</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><br />
<span style="color: #0000FF;">WHEN</span>&nbsp; &nbsp; <span style="color: #808080;">NOT</span> MATCHED <span style="color: #0000FF;">THEN</span> <span style="color: #0000FF;">INSERT</span> <span style="color: #808080;">&#40;</span>capteur_nom<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span>SRC.<span style="color: #202020;">capteur_nom</span><span style="color: #808080;">&#41;</span><br />
<span style="color: #0000FF;">OUTPUT</span>&nbsp; $ACTION, DELETED.<span style="color: #202020;">capteur_nom</span>, <span style="color: #808080;">IN</span>SERTED.<span style="color: #202020;">capteur_nom</span>;<br />
<br />
<span style="color: #0000FF;">SELECT</span>&nbsp; <span style="color: #808080;">*</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; dbo.<span style="color: #202020;">capteur</span></div></td></tr></tbody></table></div>
<p><img src="http://img855.imageshack.us/img855/6277/values07.png" alt="" /></p>
<p>On voit bien les capteurs 4, 5 et 6 ajoutés, et les capteurs 1, 2 et 3, dont les lignes existaient déjà, modifiés. Tous les capteurs portent la même date d&rsquo;ajout, transaction oblige.</p>
<p>Enfin on peut calculer le maximum d&rsquo;un tuple de valeurs sans avoir à écrire une fonction pour ce faire. Soit la variable de type TABLE suivante :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">DECLARE</span> @series <span style="color: #0000FF;">TABLE</span><br />
<span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; id <span style="color: #0000FF;">tinyint</span> <span style="color: #0000FF;">identity</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , a <span style="color: #0000FF;">tinyint</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , b <span style="color: #0000FF;">tinyint</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , c <span style="color: #0000FF;">tinyint</span><br />
<span style="color: #808080;">&#41;</span><br />
<br />
<span style="color: #0000FF;">INSERT</span>&nbsp; <span style="color: #0000FF;">INTO</span> @series<br />
<span style="color: #0000FF;">VALUES</span>&nbsp; <span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>, <span style="color: #000;">2</span>, <span style="color: #000;">3</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #000;">4</span>, <span style="color: #000;">5</span>, <span style="color: #000;">6</span><span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><span style="color: #000;">7</span>, <span style="color: #000;">8</span>, <span style="color: #000;">9</span><span style="color: #808080;">&#41;</span></div></td></tr></tbody></table></div>
<p>Nous souhaitons obtenir la plus grande valeur des trois colonnes a, b et c, pour chaque ligne. On peut exprimer ce besoin comme suit :</p>
<div class="codecolorer-container tsql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="tsql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">SELECT</span>&nbsp; id<br />
&nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">SELECT</span>&nbsp; <span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#40;</span>n<span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; <span style="color: #808080;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span>a<span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span>b<span style="color: #808080;">&#41;</span>, <span style="color: #808080;">&#40;</span>c<span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> V<span style="color: #808080;">&#40;</span>n<span style="color: #808080;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#41;</span><br />
<span style="color: #0000FF;">FROM</span>&nbsp; &nbsp; @series</div></td></tr></tbody></table></div>
<p>Ce qui amène le résultat suivant :</p>
<p><img src="http://img15.imageshack.us/img15/2505/values08.png" alt="" /></p>
<p>Amusez-vous avec VALUES !</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
