Without requiring SQLCLR to use a Regex in C#, what is the best way to get just the “stem” of a URL from a table with 500 million rows? The column is VarChar(3000) and the table has rows like this:
http://a.com
http://b.au
http://c.edu?a=3
http://d.com/?a=3
http://d.com/?a=3&b=2
http://d.com/?a=3&b=2
I need to select from the table and get this result set:
http://a.com 1
http://b.au 1
http://c.edu 1
http://d.com 3
Thanks.
How about;
Change to
for the group.