how to compare and match only the first letter of a firstname column

I need to add a filter in my where clause kinda like this:

where
lastname = lname
and
"first character of" firstName = "first character of" FNAME

This way I will get a match between CHRISTOPHER SMITH and CHRIS SMITH. I have other things I am filtering on as well like phone number, zip, ect.
LVL 1
sqlagent007Asked:
Who is Participating?
 
quincydudeConnect With a Mentor Commented:
oops.

where SUBSTR(firstName,1,1) = SUBSTR(FNAME,1,1)  
0
 
quincydudeCommented:
where SUBSTR(lastname,1,1) = SUBSTR(lname,1,1)  
0
 
quincydudeCommented:
it should be SUBSTRING

in all

where
lastname = lname
and
SUBSTRING(firstName,1,1) = SUBSTRING(FNAME,1,1)
0
 
sqlagent007Author Commented:
LOL! I figured it out when SBSTRING didn't work. Thanks a bunch!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.