Recent content by mmallkc

  1. M

    Check Constraint Works on Inserts, but Not on Updates

    Thanks Peter, The resolution was to use a filtered index rather than a constraint. Still not sure why the constraint didn't work on updates. Perhaps the UDF was being executed before the update was committed; so, no error resulted. Thanks anyway.
  2. M

    Check Constraint Works on Inserts, but Not on Updates

    I created a UDF to check for more than one instances of a value 1 in a bit column corresponding to a given ID in a table. CREATE function [dbo].[udfDefault4Scheduling] (@intNPIID int) returns bit as begin declare @bit bit set @bit = (select case when count(NPIID) <= 1 then 1 else 0 end from...
Top