SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Web Domains
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqln00b9
Starting Member

8 Posts

Posted - 07/13/2012 :  02:28:01  Show Profile  Reply with Quote
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

USA
35007 Posts

Posted - 07/13/2012 :  02:30:41  Show Profile  Visit tkizer's Homepage  Reply with Quote
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 - 07/13/2012 :  02:33:29  Show Profile  Reply with Quote
I though parsename requires 4 parts, like an IP address.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000