CODE: pull out sub domains May 26, 2011 | No Comments WHERE (PATINDEX(‘%.%’, REPLACE(REPLACE(url, ‘www.’, ”), RIGHT(url, 7), ”)) > 1) Software engineers do the job better! mssql