Welcome to Sign in | Help

Re: CAST / CONVERT

  •  02-16-2007, 1:13 PM

    Re: CAST / CONVERT

    declare @timeInWsSeconds as decimal

    set @timeInWsSeconds = 19773
    select cast(SUM(@timeInWsSeconds)/3600 as decimal(5,2)) as ORE

     dar vad ca merge si

    declare @timeInWsSeconds as decimal

    select sum(@timeInWsSeconds)/3600 as ore

    rezultatul este 5.492500 insa pentru pastrarea numai a 2 zecimale se utilizeaza prima varianta


    Gheorghe Ciubuc,SQL Server Influencer, MCP(SQL 2000), MCTS (SQL Server 2005) , OCA(Oracle 9i), Sybase(Brainbench)
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems