i want to normalize date fields from an old badly designed db dump. i now need to update every row, where the datefield only contains the year.
update table set date = '01.01.' + date
where date like '____' and isnumeric(date) = 1 and date >= 1950
but this will not work, because sql does not do short circuit evaluation of boolean expressions. thus i get an error "error converting nvarchar '01.07.1989' to int"
is there a way to work around this? the column also contains strings with a length of 4, which are not numbers (????
, 5/96
, 70/8
, etc.) the table only has 60000 rows