I have a table
Person with a column called
onvacation. This column is of data type
bit since it's a boolean in the code. It has values null, 0 and 1.
I would like to change the data type of this column from
datetime so that all values that are 1, are converted to a new date (could be current date). and 0 and null values would both be just null.
I tried following w3bschool's tutorial and did a query:
ALTER TABLE Person ALTER COLUMN onvacation datetime
But that gives an error
'DF____Person__onvac__59062A42' is dependent on column 'onvacation'.