<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>T-SQL</title><link>http://sqlserver.ro/forums/15/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: CASE in functii Agregat</title><link>http://sqlserver.ro/forums/thread/1554.aspx</link><pubDate>Thu, 18 Jan 2007 13:26:58 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1554</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1554.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1554</wfw:commentRss><description>&lt;P&gt;O alta rezolvare/demonstratie pe site-ul nostru &lt;A class="" href="http://sqlserver.ro/forums/thread/445.aspx"&gt;aici&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: CASE in functii Agregat</title><link>http://sqlserver.ro/forums/thread/1546.aspx</link><pubDate>Wed, 17 Jan 2007 16:19:56 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1546</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1546.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1546</wfw:commentRss><description>&lt;P&gt;Merge si pe 2000. Tocmai am testat pe serverul din spatele RoSQL (un SQL Server 2000) urmatorul cod:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;USE tempdb;&lt;BR&gt;GO&lt;BR&gt;CREATE TABLE T(I INT, COL_X INT, COL_Y INT);&lt;BR&gt;GO&lt;BR&gt;INSERT INTO T(I,COL_X,COL_Y) VALUES (1,2,1);&lt;BR&gt;INSERT INTO T(I,COL_X,COL_Y) VALUES (2,3,2);&lt;BR&gt;INSERT INTO T(I,COL_X,COL_Y) VALUES (3,4,1);&lt;BR&gt;INSERT INTO T(I,COL_X,COL_Y) VALUES (4,5,2);&lt;BR&gt;INSERT INTO T(I,COL_X,COL_Y) VALUES (5,6,1);&lt;BR&gt;GO&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;SELECT SUM( T.Col_x * (CASE WHEN T.Col_Y = 1 THEN 1000 ELSE 1 END)) &lt;BR&gt;FROM T&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-- Rezultat 12008&lt;/STRONG&gt;&lt;/P&gt;</description></item><item><title>Re: CASE in functii Agregat</title><link>http://sqlserver.ro/forums/thread/1545.aspx</link><pubDate>Wed, 17 Jan 2007 14:08:28 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1545</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1545.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1545</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://sqlserver.ro/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Cryogenic1981:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;...insa se pare ca nu functioneaza ...&lt;/p&gt;&lt;p&gt;
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;...ce se intampla mai exact? Obtii vreun mesaj de eroare?&lt;/p&gt;&lt;p&gt;** tocmai am incercat SELECT-ul (ce-i drept pe SQL 2005) si pare OK...&lt;br&gt;
&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>CASE in functii Agregat</title><link>http://sqlserver.ro/forums/thread/1542.aspx</link><pubDate>Wed, 17 Jan 2007 13:23:12 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1542</guid><dc:creator>Cryogenic1981</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1542.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1542</wfw:commentRss><description>&lt;P&gt;Am incercat sa fac ceva de genu (Sql Server 2000):&lt;/P&gt;
&lt;P&gt;SELECT Sum(&amp;nbsp;T.Col_x * (CASE WHEN&amp;nbsp;T.Col_Y = 1&amp;nbsp;THEN 1000 ELSE 1 END)) FROM Table T insa se pare ca nu functioneaza ...&lt;/P&gt;
&lt;P&gt;Intrebarea e: Functioneaza CASE in functiile agregat in Sql Server 2000? daca nu exista ceva alternativa fara sa fac Sum() de mai multe Sum-uri?&lt;/P&gt;</description></item></channel></rss>