Hmm, close, but that assumes the domain only has a third/second/top syntax, so it turns "fourth.third.second.first" into "third.second.first", which isn't what I want.
Much cleaner, I would never had guess to use PARSENAME as a string function, but it works the same here.
Anthony Perkins
PARSENAME() is a string function, it is just normally used for SQL Server Objects.
Word of caution: PARSENAME() supports only 4 parts so if you have this fifth.fourth.third.somedomain.com, it will break down. So feel free if you want to withdraw the points.
Open in new window