say I have a table customer with columns Firstname and lastname I would like to be able to write a query that selects all the customers which has exact lastname and the fuzzy firstname
The Substring is returning the values as expected when I run this just on the firstname column
Query
SELECT SUBSTR(firstname,1,4) from customer;
**output:**
ABCD
qwry
cvbn etc
But I am not sure how to get this work to do a match for 2 records, one of the customers having first 4 characters of firstname same as the other customer firstname.
Example:
Customer1:Firstname=ABCDXYZ Lastname=SSS
Customer2:Firstname=ABCD Lastname=SSS
The expected outcome is to be able to see these 2 records in the output