Showing posts with label consider. Show all posts
Showing posts with label consider. Show all posts

Wednesday, March 21, 2012

name of month from int value

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

Nagios.

We use Nagios for our Unix monitoring and, in one of the meetings, it was
also pointed out if we can consider using Nagios for monitoring SQL Server.
So far, the information I have gathered from the web esp. Nagios.org is bit
sketchy.
Has anyone here has practically used Nagios to monitor SQL Server? If yes,
anything that you would like to share?
Thanks.
--
Regards,
MZeeshanHi MZeeshan,
Yes, since this is a third party tools, let's wait to see whether others
has practical experience about using Nagios or other tools monitoring SQL
Server.
Sincerely yours,
Michael Cheng
Microsoft Online Partner 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.

Nagios.

We use Nagios for our Unix monitoring and, in one of the meetings, it was
also pointed out if we can consider using Nagios for monitoring SQL Server.
So far, the information I have gathered from the web esp. Nagios.org is bit
sketchy.
Has anyone here has practically used Nagios to monitor SQL Server? If yes,
anything that you would like to share?
Thanks.
Regards,
MZeeshanHi MZeeshan,
Yes, since this is a third party tools, let's wait to see whether others
has practical experience about using Nagios or other tools monitoring SQL
Server.
Sincerely yours,
Michael Cheng
Microsoft Online Partner 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.sql

Nagios.

We use Nagios for our Unix monitoring and, in one of the meetings, it was
also pointed out if we can consider using Nagios for monitoring SQL Server.
So far, the information I have gathered from the web esp. Nagios.org is bit
sketchy.
Has anyone here has practically used Nagios to monitor SQL Server? If yes,
anything that you would like to share?
Thanks.
Regards,
MZeeshan
Hi MZeeshan,
Yes, since this is a third party tools, let's wait to see whether others
has practical experience about using Nagios or other tools monitoring SQL
Server.
Sincerely yours,
Michael Cheng
Microsoft Online Partner 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.