Hello
I need to know if it´s possible build a TSQL pivot table to increase new columns header fields dynamicaly.
for example : TotalSales by vendors an countries on my invoices.
| New Jersey | Canada | France | Portugal |
paul | 100 | | | |
luis | | 15 | | |
lisa | 10 | | | |
if in my table country i insert a new country , and i make sales to them on some invoices, i need automaticaly my TSQL pivot table add this new one.
Maybe to simplify , i need all the countries of my countries tables , and only have data on columns where my vendors have sales.
it´s simple im ACCESS but in SQL i don´t know how to do this
Many thanks
Luis Santos