I need to isolate the domain name of email addresses. ie I want to access the 'Hotmail' in an email address like John@Hotmail.com. I'm sure I'm not the first one to do this and would like an idea how this could be done in DB2. I want to extract the full domain name starting after the @sign and excluding the .com, .org .whatever at the end. I know thet occasionally there will be embedded periods in the domain name. Thanks for any ideas you may have.
You could modify this easily enough to take the substring from the position after the first @ to the position before the first period, but as you say, you might have a period in the domain name (or more likely the recipients name), so this wouldn't always work.