I have a table called Match which has columns DateFrom and DateTo. I need my query to get all records that have their DateFrom OR DateTo between two selected dates.
I tried:
Select distinct P.FName, M.Team from Match M Person P where P.Team = M.Team and M.DateFrom OR M.DateTo between...
Apologies for bothering you again but how can I get the above to only include dates in 2011? Thanks :)
I have:
SELECT Format(LicenceExp,'mmm') AS [Month], Format(LicenceExp, 'yyyy') as [Year], Count(*) AS Occ
FROM Licence
GROUP BY Format(LicenceExp,'mmm'), Month([LicenceExp])...
I need to get the name of each month that an expiry date exists and the number of expiry dates per month.
SELECT Format(LicenceExp,'mmm') as Month, count (*) as Occ
from Licence
group by Format(LicenceExp,'mmm')
order by Format(LicenceExp,'mmm') DESC
Results:
Dec 1
Jun 1
Oct 2
Jul...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.