|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Today @ 10:29 PM
Points: 69,
Visits: 318
|
|
Why not combine not updating the time in DOB with this?
IF UPDATE(DOB) BEGIN UPDATE P SET DOB = dbo.fn_ReplaceTimeInDate(i.DOB) FROM dbo.Patient P INNER JOIN inserted i ON P.PatientID = i.PatientID where i.DOB <> cast(convert(varchar,i.DOB,112) as datetime)
SET @error_var = @@ERROR --Error checking IF @error_var > 0 GOTO rollback_tran END
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 1:51 PM
Points: 1,019,
Visits: 333
|
|
| Thanks!! That may be the best way to fix it. Or a variation at least.
|
|
|
|