I have a large table that has many datetime fields. These fields have been entered as 01/01/1900 as default rather than as nulls. I would like to write an update trigger for when the record is updated, to update each of the date fields to be a null should the date be 01/01/1900, otherwise it'll leave it as a valid date.
My question is, is there an easy was to scan an updated row for the date 01/01/1900 and then replace them with nulls without looking directly for the datetime fields in one go? Or is it just the case of writing a tigger with a series of IF statements for the datetime fields?
Many thanks in advance
abrewis
My question is, is there an easy was to scan an updated row for the date 01/01/1900 and then replace them with nulls without looking directly for the datetime fields in one go? Or is it just the case of writing a tigger with a series of IF statements for the datetime fields?
Many thanks in advance
abrewis