I've got one site in ColdFusion where the client now wants to get a list of certain users who are over a particular age. Here's my code so far:
<cfset minRefAge = 21 >
<cfquery name="rsReferees" datasource="nbsa">
SELECT ID, userFirstName + ' ' + userLastName AS refName, userTown, userDOB, userAccess
FROM UsersSSO
WHERE (dateDiff("yyyy", userDOB, now() ) => #minRefAge#) AND userAccess = 4
</cfquery>
userDOB is my date of birth field. When I run it, I get the following error:
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
I can't spot the error. Could someone help?