I want to run a query where the left 3 of [lastName] (that is the field name) is not the same as [lastName]. I know this is the syntax for the Left function, but how do I do the not equal to portion?
Code:L3: LEFT([lastName],3)
I want to run a query where the left 3 of [lastName] (that is the field name) is not the same as [lastName]. I know this is the syntax for the Left function, but how do I do the not equal to portion?
Code:L3: LEFT([lastName],3)
That doesn't really make sense. What are you trying to do? Are you comparing values from two tables?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
No it is one table, but a few last names were input incorrectly. So what I was thinking was view lastName in one field (query field that is) then view lastName where the left3 is not the same. Was thinking (and it may not make sense) use string comparison to see where the typo's occured.
You would just use the following in the Criteria row (WHERE clause):
Really, in essence, all you are doing is returning all last names that are more than 3 characters long. You could also do that with:Code:LEFT([lastName],3) <> [lastName]
Code:LEN([lastName])>3
None of that will reveal misspelled names. Comparing a field to itself makes no sense. Need to compare with some master list and do a find unmatched query. Then it will be a case-by-case review to decide which is correct.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.