Hi,I have a table with 4 columns: ID, Date1, Date2 and ValueI want to make an Update to Value field based on the difference between Date1 and Date2.if difference < 6 then Value = 1if difference between 6 and 10 then Value = 2else value = 3What's it's wrong here?Update table_name set Value= (Select ID,date1,Date2, Value= case Datediff(day, Date1,Date2) When Value < 6 then '1' When Value between 6 and 10 then '2' else '3' end,From table_name
Thank's