|
Posted by Erland Sommarskog on 09/22/06 07:20
imani_technology_spam@yahoo.com (imani_technology_spam@yahoo.com) writes:
> Speaking of testing, what would happen if I inserted a bunch of rows
> into the table that already have LabID's? Would that cause a problem
> with the trigger? I'm thinking about future data migration.
The trigger does not take that in regard, because that was not in the
requirement specification. But you could use the coalesce function to
handle this. coalesce takes a list of values as input parameters, and
returns the first non-NULL value in the list.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|