What is the best way to get the month name from an int value
within a mssql statement ?
(there is no need to consider the language settings)
e.g.
1 -> January
11 -> Novembre
My first approach seems to work but is very ugly:
CASE WHEN my_month_int<10
THEN DATENAME(month,"20000"+cast(my_month_int as varchar(2))+"15 00:00:00")
ELSE DATENAME(month,"2000"+cast(my_month_int as varchar(2))+"15 00:00:00")
END AS my_month_nameselect datename(m,dateadd(m,my_month_int-1,0)) as my_month_name
:cool:|||Thanx a lot, r937. Nice trick.sql
Showing posts with label settings. Show all posts
Showing posts with label settings. Show all posts
Wednesday, March 21, 2012
Saturday, February 25, 2012
My Site option
What permission is required to be able to go into the "My Site" settings in
the Report Manager? Is it looking for a specific permission in the
ReportServer database, config file, or some machine permission?Correction, I meant the "Site Setting" option. What permission is required
to be able to go into the "Site Setting" option?
"David" wrote:
> What permission is required to be able to go into the "My Site" settings in
> the Report Manager? Is it looking for a specific permission in the
> ReportServer database, config file, or some machine permission?|||Hello David,
You need to create a new server side role and grant proper server side
permission.
At least, you need to grant the following:
Execute Report Definitions
Manage report server properties
View report server properties
View shared schedules
Or any other Server Management permission like Manage report server
security,Manage roles, Manage shared schedules.
Once you grant one of these Server management permission to the Role and
assign a user to this Server Side Role, the user could see the 'Site
Setting' in the Report Manager.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
the Report Manager? Is it looking for a specific permission in the
ReportServer database, config file, or some machine permission?Correction, I meant the "Site Setting" option. What permission is required
to be able to go into the "Site Setting" option?
"David" wrote:
> What permission is required to be able to go into the "My Site" settings in
> the Report Manager? Is it looking for a specific permission in the
> ReportServer database, config file, or some machine permission?|||Hello David,
You need to create a new server side role and grant proper server side
permission.
At least, you need to grant the following:
Execute Report Definitions
Manage report server properties
View report server properties
View shared schedules
Or any other Server Management permission like Manage report server
security,Manage roles, Manage shared schedules.
Once you grant one of these Server management permission to the Role and
assign a user to this Server Side Role, the user could see the 'Site
Setting' in the Report Manager.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Posts (Atom)