query help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

can anyone tell me why this query isn't working:


SELECT customerinformation.[First Name], customerinformation.[Last Name],
customerinformation.[Member Number], customerinformation.[Date Of Birth],
customerinformation.Status, Month([date of birth]) AS [Month Born]
FROM customerinformation
WHERE (((customerinformation.Status)="Active" Or
(customerinformation.Status)="Status" Or (customerinformation.Status)="AR -
In Matching"));

This works except that it will not let me sort the month born colum. If I
add Month([Date Of Birth])=Month(Date()) it doesn't return any records. I am
using mySQL as the back end and i'm not sure if thats why its acting funny or
what else it could be.
 
Hi Dan

The expression in your query should be "Month: DatePart("m",[xxx])" - where
[xxx] is the name of your date of birth field.
 
Back
Top