Welcome to Sign in | Help

Re: Group by ...

  •  11-27-2007, 4:49 PM

    Re: Group by ...

    De ce ai vrea coloana 4 daca tu o dai ca parametru de input?

     select column4, case when count(column1) =0 then 0 else sum(valoare) end as 'test'
    from table1
    where column3 = 0
    and data <= '2007-09-30'
    and column4 = 145214

     Poti sa inlocuiesti column4 cu valoarea ei:

      select 145214 as column4, case when count(column1) =0 then 0 else sum(valoare) end as 'test'
    from table1
    where column3 = 0
    and data <= '2007-09-30'
    and column4 = 145214

     

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems