January 22, 2019 at 2:23 pm
Good afternoon
I would like a script that can generate the following query, but that has the possibility to see also see the previous years with their months. It is more like a fiscal period, which contains years and months.
Thanks
January 22, 2019 at 3:32 pm
angelreynosog - Tuesday, January 22, 2019 2:23 PMGood afternoonI would like a script that can generate the following query, but that has the possibility to see also see the previous years with their months. It is more like a fiscal period, which contains years and months.
Thanks
This is a requirement, not a question. Which part of all of this is proving difficult for you?
Your results look like a cross tab type of report. This type of reporting is usually handled better by the presentation tool (SSRS, Excel etc) than in T-SQL.
If you do not provide sample DDL and INSERT scripts , how do you expect anyone to offer pertinent assistance?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
January 22, 2019 at 9:30 pm
Phil Parkin - Tuesday, January 22, 2019 3:32 PMangelreynosog - Tuesday, January 22, 2019 2:23 PMGood afternoonI would like a script that can generate the following query, but that has the possibility to see also see the previous years with their months. It is more like a fiscal period, which contains years and months.
Thanks
This is a requirement, not a question. Which part of all of this is proving difficult for you?
Your results look like a cross tab type of report. This type of reporting is usually handled better by the presentation tool (SSRS, Excel etc) than in T-SQL.
If you do not provide sample DDL and INSERT scripts , how do you expect anyone to offer pertinent assistance?
And quit double posting.
https://www.sqlservercentral.com/Forums/2017374/Year-By-Months-Columns
--Jeff Moden
Change is inevitable... Change for the better is not.
January 23, 2019 at 6:58 am
Jeff Moden - Tuesday, January 22, 2019 9:30 PMPhil Parkin - Tuesday, January 22, 2019 3:32 PMangelreynosog - Tuesday, January 22, 2019 2:23 PMGood afternoonI would like a script that can generate the following query, but that has the possibility to see also see the previous years with their months. It is more like a fiscal period, which contains years and months.
Thanks
This is a requirement, not a question. Which part of all of this is proving difficult for you?
Your results look like a cross tab type of report. This type of reporting is usually handled better by the presentation tool (SSRS, Excel etc) than in T-SQL.
If you do not provide sample DDL and INSERT scripts , how do you expect anyone to offer pertinent assistance?And quit double posting.
https://www.sqlservercentral.com/Forums/2017374/Year-By-Months-Columns
Thanks!!! The solution Dynamics Pivot!
January 23, 2019 at 6:59 am
Jeff Moden - Tuesday, January 22, 2019 9:30 PMPhil Parkin - Tuesday, January 22, 2019 3:32 PMangelreynosog - Tuesday, January 22, 2019 2:23 PMGood afternoonI would like a script that can generate the following query, but that has the possibility to see also see the previous years with their months. It is more like a fiscal period, which contains years and months.
Thanks
This is a requirement, not a question. Which part of all of this is proving difficult for you?
Your results look like a cross tab type of report. This type of reporting is usually handled better by the presentation tool (SSRS, Excel etc) than in T-SQL.
If you do not provide sample DDL and INSERT scripts , how do you expect anyone to offer pertinent assistance?And quit double posting.
https://www.sqlservercentral.com/Forums/2017374/Year-By-Months-Columns
Thanks!!! The solution Dynamics Pivot!
January 23, 2019 at 7:32 am
angelreynosog - Wednesday, January 23, 2019 6:59 AMJeff Moden - Tuesday, January 22, 2019 9:30 PMPhil Parkin - Tuesday, January 22, 2019 3:32 PMangelreynosog - Tuesday, January 22, 2019 2:23 PMGood afternoonI would like a script that can generate the following query, but that has the possibility to see also see the previous years with their months. It is more like a fiscal period, which contains years and months.
Thanks
This is a requirement, not a question. Which part of all of this is proving difficult for you?
Your results look like a cross tab type of report. This type of reporting is usually handled better by the presentation tool (SSRS, Excel etc) than in T-SQL.
If you do not provide sample DDL and INSERT scripts , how do you expect anyone to offer pertinent assistance?And quit double posting.
https://www.sqlservercentral.com/Forums/2017374/Year-By-Months-ColumnsThanks!!! The solution Dynamics Pivot!
Heh... Again, I don't recommend using the PIVOT operator. I recommend using the lost "Black Art" of CROSSTABs.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply