Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver,microsoft.public.sqlserver.programming Subject: Re: Stored Procedure Code Critique Requested Date: Wed, 06 Apr 2011 23:58:15 +0200 Organization: Erland Sommarskog Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx01.eternal-september.org; posting-host="DD6dU+BfJNjsjSP4/K/V7w"; logging-data="13681"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19N4T1HOa7Vd6V0GJ1LwhSH" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:YJfVfpX/hnUg0R8fOuanrG/Evcg= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:133 Gene Wirchenko (genew@ocis.net) writes: > What I am going to put on top of this is an insert/update trigger > to clean up strings. Can I call .Net code from within a trigger? Yes. I think you would put this in a function, and calling CLR UDF is just the same as calling a T-SQL UDF. You can even write triggers directly in the CLR. I will have that I have yet to see a use case for that. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx