Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Web Domains

Author  Topic 

sqln00b9
Starting Member

8 Posts

Posted - 2012-07-13 : 02:28:01
Hello,
I have a column with various unstructured domains...many of which refer to the same company:

a.microsoft.com
microsoft.com
b.microsoft.com
mx.microsoft.com
email.microsoft.microsoft.com
----

is there an easy way to just retrieve microsoft.com from the examples?essentially, start from the end go up to the text after first .

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-07-13 : 02:30:41
You can use the PARSENAME function for this.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sqln00b9
Starting Member

8 Posts

Posted - 2012-07-13 : 02:33:29
I though parsename requires 4 parts, like an IP address.
Go to Top of Page
   

- Advertisement -