I need a sql Stored Procedure \ Function that I can call in MS SQL 2008 + that will evaluate an input list of URL's and strip it down to domain name and give me a COUNT.
The input table will contain a primary key and up to 20 URL Fields (Primary Key, URL1, URL2, URL3, etc) in a column format. I will bring the list into a temporary SQL table and then I need to run a query against the table that will evaluate each URL across thousands of records and strip the url to its domain name and give me a COUNT. The URL may be quite long, for example, the URL may be "[login to view URL]" or it may be secure: "[login to view URL]". The function would strip the URL of everything around the domain information and return the list" "[login to view URL]", "[login to view URL]", etc. etc.