I managed to build the SQL, it was through a SP
Only now I have a problem, I can not update the date
I will explain
I have a parameter with years. default is 2012
and the parameter of dates fetches the year.
Then when I change the year, the dates of the parameter does not update!
How do I solve this problem?