The 2nd Query is just for reference, that what I'm trying to get into the results. My main Table is tblGen_Users and UserID is PK, I've tried every logic, I can think; but no luck.
COUNT(A.OutletID) AS TotalSignups,
DATENAME(Month, A.SignupDate) AS Month
dbo.tblGen_Users AS B LEFT OUTER JOIN
--The tblGen_Users contains all the values
dbo.tblMer_Outlet AS A ON B.UserID = A.SignedByUserID
--The tblMer_Outlet contains only the selected values
/* If the values from tblGen_Users are not available in tblGen_Merchant, the missing values must be displayed in the result mentioning 0 under COUNT */
(A.SignupDate >= '2014-04-01 00:00:00') AND
(A.SignupDate <= '2014-04-30 23:59:59')
I do know that the second query was for reference. My point was that your first query would not return any values from the second table that did not exist in the first table.
For better assistance in answering your questions, click hereFor tips to get better help with Performance Problems, click hereFor Running Totals and its variations, click here
or when working with partitioned tablesFor more about Tally Tables, click hereFor more about Cross Tabs and Pivots, click here
and hereManaging Transaction Logs
SQL Musings from the Desert Fountain Valley SQL
(My Mirror Blog)