I have to implement a where clause which should give me the matching substring.
Eg: I have a column destination email in a table called
Right now, I am using the below query:
select * from table where destinationEmail= CHARINDEX(DestinationEmail, varTo)>0.
Currently, I am facing an issue with 2 email addresses ([email protected] and [email protected]) which is returning 2 rows. For other emails, this condition returns the correct values without any issues
The exact result what I want is the system should pick the email which exist in the "destinationEmail" and should ignore other emails stored in the
Is it possible to achieve this using a simple where condition?
Many thanks, Manoj