Hi Logan
This is an English language news group and I don't speak Itallian, so I hope
your post isn't in Spanish!!!
Check out for a crosstab that will transform your rows to columns:
http://support.microsoft.com/default...;EN-US;q175574
You will also need to use a derived query to group the data into years
SELECT società, YEAR(datafattura), SUM(valorefattura)
FROM MyTable
GROUP BY società, YEAR(datafattura)
This is what Altavista says!
Ciò è un gruppo di notizie di lingua inglese e non parlo italiano, in modo
da spero il vostro alberino non sono nello Spagnolo!!!
Verific un crosstab che trasformerà le vostre file alle colonne:
http://support.microsoft.com/default...;EN-US;q175574
Inoltre dovrete usare una domanda derivata per raggruppare i dati negli anni
SELECT società, YEAR(datafattura), SUM(valorefattura)
FROM MyTable
GROUP BY società, YEAR(datafattura)
John
"Logan" <lo*******@hotmail.com> wrote in message
news:bm************@ID-141292.news.uni-berlin.de...
Ciao ho una tabella in sql server formata da questi campi
società, valorefattura, datafattura
Vorrei estrarre i dati in questo modo
anno anno -1
anno -2
Società somma(valorefattura) somma(valorefattura)
somma(valorefattura)
Potete aiutarmi a costruire la query?
Ciao grz by Logan bye bye