Welcome to Sign in | Help

Re: select mai ciudat.

  •  10-19-2006, 1:29 PM

    Re: select mai ciudat.

    Realizati ceva similar cu

    select Year,

    sum (CASE Quarter WHEN 1 THEN Amount ELSE 0 END) as Trim1,

    sum (CASE Quarter WHEN 2 THEN Amount ELSE 0 END) as Trim2,

    sum (CASE Quarter WHEN 3 THEN Amount ELSE 0 END) as Trim3,

    sum (CASE Quarter WHEN 4 THEN Amount ELSE 0 END) as Trim4

    from Northwind.dbo.Tabel

    Group by YEAR

     

    face sumarizare pe trimestre.

    Dvs faceti numarare, in conditiile in care item1 are niste valori discrete de un nr. redus. 

     


    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