You are here: Re: One trigger, many tables - how to automate? « MsSQL Server « IT news, forums, messages
Re: One trigger, many tables - how to automate?

Posted by Ots on 05/15/07 16:30

The job has been completed. To follow Erland's analogy, I used "Hammer
2003" (VB.NET) as he is right, there is no sensible way to accomplish
this in a stored procedure. Thanks to the tips on dynamic SQL, the new
and improved triggers run much faster, and can now be generated and
installed w/ the touch of a button.

Thanks again to everyone for their help!

On May 13, 12:59 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
>
> We don't want too many tools in this company! You must not use hammers!
> We have very good screwdrivers! Use them to get the nails in place!
>
> Doing this in a stored procedure in SQL 2000 is just sheer stupidity.
> In SQL 2005, it's different, as you could put your VB code in a CLR
> stored procedure. And if you still like to hurt yourself and do string
> manipulation in T-SQL, you could use nvarchar(MAX).
>
> I'll tell you what, if your employer is that boneheaded, tell him
> that you really must use Screwdriver 2005 for this, but the Express version
> is sufficient. That is, download and install an instance of SQL Express
> on the same machine, and set up a linked server. Built the triggers on
> SQL Express, and then use EXEC() AT to deploy them on SQL 2000.
>
> Of course, you will still do the job faster with a VB or a Perl hammer,
> assuming that you have experience of string manipulation in these
> languages. Then again, since you are employed and not a consultant that
> charge by the other, maybe your employer doesn't care.
>
> --
> Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
>
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация