I am trying to select the domain from the column where I have email addresses.
For example, I have a table email_table and a column email with email addresses as below.
[email protected]
[email protected]
[email protected]
Expected result
gmail.com
yahoo.com
gmx.com
Here is the query I tried with CHARINDEX that works in SQL Server but not in DB2.
select CHARINDEX('@', email) from email_table