I have this table, named Prospects :
+---------+-------------+
| Name | PhoneNumber |
+---------+-------------+
|John | 08199999 |
|Viona | 08332222 |
+---------+-------------+
on the other hand I have this table too, named SMSD :
+-----------------+---------------+
| Message | PhoneNumber |
+-----------------+---------------+
|Hello World! | +628199999 |
|Hi World | +628332222 |
+-----------------+---------------+
now I need to do LEFT JOIN to that both tables based on PhoneNumber : Prospects.PhoneNumber = SMSD.PhoneNumber while on the SMSD table phone number always had country code prefix.
thanks!
(Not tested)
This should remove the country code prefix from the SMSD phone number and the leading zero from the Prospects phone number before performing the join.