ciao a tutti ho una domanda da fare relativa alla sintassi Microsoft SQL Server (non mysql)
allora, ho la seguente query
select entity,
case when [time]='20070100' then 'X' else '' end as jan,
case when [time]='20070200' then 'X' else '' end as feb,
case when [time]='20070300' then 'X' else '' end as mar
from TLCOWNERSHIP
where [time] in('20070100','20070200','20070300')
mi restituisce la seguente tabella composta dalle colonne entity, jan, feb, mar
entity ----jan feb mar
P001393 X null null
P001393 X
P004947 X null null
P004471 X null null
P004471 null null X
P004471 null X null
io ho bisogno di raggruppare le entity in modo che ad ogni entity corrisponda una sola riga, non so se mi sono spiegata bene, ma il risultato deve essere qst:
entity --- jan feb mar
P001393 X X null
P004947 X null null
P004471 X X X
qualcuno mi può aiutare???
ho provato col group by ma nn mi da il risultato che cerco
Grazie
Silvia