<?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: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1845.aspx</link><pubDate>Fri, 16 Feb 2007 11:18:57 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1845</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1845.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1845</wfw:commentRss><description>&lt;P&gt;variabila trebuie sa fie int.....e o coloana dintr-un tabel de type int....pe care nu o pot modifica&lt;/P&gt;
&lt;P&gt;multumesc&lt;/P&gt;</description></item><item><title>Re: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1844.aspx</link><pubDate>Fri, 16 Feb 2007 11:17:19 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1844</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1844.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1844</wfw:commentRss><description>&lt;P&gt;sau asa&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;declare @timeInWsSeconds as int&lt;BR&gt;set @timeInWsSeconds = 19773&lt;BR&gt;select cast(SUM(convert(decimal,@timeInWsSeconds)/3600) as decimal(5,2)) as ORE&lt;/P&gt;
&lt;P&gt;multumesc mult ;)&lt;/P&gt;</description></item><item><title>Re: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1843.aspx</link><pubDate>Fri, 16 Feb 2007 11:16:46 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1843</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1843.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1843</wfw:commentRss><description>&lt;P&gt;Nu e neaparat nevoie ca variabila sa fie declarata int pt ca un decimal poate "inghiti" numere int, adica&lt;/P&gt;
&lt;P&gt;nr intreg 5434 este vazut decimal asa 5434.00&lt;/P&gt;</description></item><item><title>Re: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1842.aspx</link><pubDate>Fri, 16 Feb 2007 11:15:01 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1842</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1842.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1842</wfw:commentRss><description>&lt;P&gt;o sa-l fac asa ca alta varianata nu stiu&lt;/P&gt;
&lt;P&gt;declare @timeInWsSeconds as int&lt;BR&gt;set @timeInWsSeconds = 19773&lt;BR&gt;select LEFT(SUM(convert(decimal,@timeInWsSeconds)/3600),4)&amp;nbsp; as ORE&lt;/P&gt;</description></item><item><title>Re: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1841.aspx</link><pubDate>Fri, 16 Feb 2007 11:13:36 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1841</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1841.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1841</wfw:commentRss><description>&lt;P&gt;declare @timeInWsSeconds as decimal&lt;/P&gt;
&lt;P&gt;set @timeInWsSeconds = 19773&lt;BR&gt;select cast(SUM(@timeInWsSeconds)/3600 as decimal(5,2)) as ORE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;dar vad ca merge si &lt;/P&gt;
&lt;P&gt;declare @timeInWsSeconds as decimal&lt;/P&gt;
&lt;P&gt;select sum(@timeInWsSeconds)/3600 as ore&lt;/P&gt;
&lt;P&gt;rezultatul este 5.492500 insa pentru pastrarea numai a 2 zecimale se utilizeaza prima varianta&lt;/P&gt;</description></item><item><title>Re: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1840.aspx</link><pubDate>Fri, 16 Feb 2007 11:12:02 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1840</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1840.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1840</wfw:commentRss><description>&lt;P&gt;am aincercat asa &lt;/P&gt;
&lt;P&gt;declare @timeInWsSeconds as int&lt;BR&gt;set @timeInWsSeconds = 19773&lt;BR&gt;select SUM(convert(decimal,@timeInWsSeconds)/3600)&amp;nbsp; as ORE&lt;/P&gt;
&lt;P&gt;dar am prea multe zecimale vreau sa limitez la 2&lt;/P&gt;
&lt;P&gt;sa-mi ramana doar 5.49&lt;/P&gt;</description></item><item><title>Re: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1839.aspx</link><pubDate>Fri, 16 Feb 2007 11:01:52 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1839</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1839.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1839</wfw:commentRss><description>&lt;P&gt;nu pot modifica @timeWsSeconds in decimal....el trebuie sa ramana int.....asa e definita in respectivul tabel.&lt;/P&gt;
&lt;P&gt;mai sus am folosit variabila ca am tot testat si d-aia.......cum ar arata scriptul te rog daca as modifica in select timeWsSeconds din int in decimal?&lt;/P&gt;
&lt;P&gt;multumesc&lt;/P&gt;</description></item><item><title>Re: CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1837.aspx</link><pubDate>Fri, 16 Feb 2007 10:47:40 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1837</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1837.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1837</wfw:commentRss><description>&lt;P&gt;Asa si trebuie sa afiseze pentru ca se face impartire intre intregi si scoate intreg, pe urma se face conversia la decimal&lt;/P&gt;
&lt;P&gt;si converteste intregul 5 la 5.00.&lt;/P&gt;
&lt;P&gt;O solutie ar fi ca @timeInWsSeconds sa fie declarat decimal si merge&lt;/P&gt;</description></item><item><title>CAST / CONVERT</title><link>http://sqlserver.ro/forums/thread/1836.aspx</link><pubDate>Fri, 16 Feb 2007 10:27:08 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1836</guid><dc:creator>Alex</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1836.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=1836</wfw:commentRss><description>&lt;P&gt;salut......unde gresesc de nu-mi afiseaza cu 2 zecimale&lt;/P&gt;
&lt;P&gt;&amp;nbsp;declare @timeInWsSeconds as int&lt;BR&gt;set @timeInWsSeconds = 19773&lt;BR&gt;select cast(SUM(@timeInWsSeconds)/3600 as decimal(5,2)) as ORE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;acum imi afiseaza 5 ...iar eu as vrea 5.49&lt;/P&gt;
&lt;P&gt;multumesc&lt;/P&gt;</description></item></channel></rss>