E
erick-flores
Hello all
I have a table that has the complete name for each user.
I would like to run a query to match the FirstName LastName with the
CurrentUser() and return a user_code.
This is the query that im using now:
SELECT users.user_code, users.name
FROM users
GROUP BY users.user, users.name
HAVING users.name Like (CurrentUser());
Everything works fine when the Logon Name is the exact as the name
from my table BUT the problem comes when the user forgot to type caps
to its Logon Name, when this happends then my query will return the
user_code. Also I want to be able to match any word from the
CurrentUser() to my users.name field. For example:
Logon Name: BJ Moore
Users.name: B J Moore Jr.
I want my query to be able to return the user_code for the example
above.
Thanks in advance
I have a table that has the complete name for each user.
I would like to run a query to match the FirstName LastName with the
CurrentUser() and return a user_code.
This is the query that im using now:
SELECT users.user_code, users.name
FROM users
GROUP BY users.user, users.name
HAVING users.name Like (CurrentUser());
Everything works fine when the Logon Name is the exact as the name
from my table BUT the problem comes when the user forgot to type caps
to its Logon Name, when this happends then my query will return the
user_code. Also I want to be able to match any word from the
CurrentUser() to my users.name field. For example:
Logon Name: BJ Moore
Users.name: B J Moore Jr.
I want my query to be able to return the user_code for the example
above.
Thanks in advance