Why we use CLR procedures

.net, c#, sql-server, sqlclr, vb.net

Solution

Imagine you want to validate some of your data fields in SQL Server using a regular expression. To this day, even in SQL Server 2008 R2, this is virtually impossible with just T-SQL code.

However, with a little help from a CLR stored procedure or stored function, this would be a piece of cake.

T-SQL is very strong when it comes to manipulating sets of data - use it for that.

CLR is very strong in other areas, like string and date manipulation, calling external services (WCF, web services).

So T-SQL stored procedures and CLR stored procedures are a nice complement - each solving a specific set of challenges that the other is not particularly good at.

Problem

Why we use CLR procedures. Is there any significance of CLR Procedures or any example where CLR Procedure is the only solution?

Original source

Related problems