Q:

How do i retrieve a specific month? Now its retrieving all the months in my graph

SELECT 
    COUNT(*) AS TotalGuestBook_TotalCount, 
    MONTH(GuestBook_CreatedDate) AS month
FROM
    tbl_Guestbook
GROUP BY
    MONTH (GuestBook_CreatedDate) 

A:

you need to describe your question not just on the title and give a simple query. what i can get from your script and try to understand is this :
SELECT count(*) AS TotalGuestBook_TotalCount, MONTH(GuestBook_CreatedDate) as months
from tbl_Guestbook
where MONTH(GuestBook_CreatedDate) in (the month you want to search)
group by MONTH (GuestBook_CreatedDate) 

since you want the name, it's easy to be done:
SELECT DATENAME(month,datetime) from table.

the datename function will help you. but you have to change your query like this:
SELECT count(*) AS TotalGuestBook_TotalCount,
       cast(datename(month,GuestBook_CreatedDate)as varchar(20)) as month_name
from tbl_Guestbook
where MONTH(GuestBook_CreatedDate) in (the month you want to search)
group by cast(datename(month,GuestBook_CreatedDate)as varchar(20))

if you just want a abbreviation of the month name just cast the varchar(20) to be 3.  like now it will show January, varchar(3) will be Jan

