I'm attempting to create a column which calculates the date based on the start date and a week count column. Below is my code:
ALTER TABLE Salesforce_Expanded
ADD current_date DATE;
GO
UPDATE Salesforce_Expanded
SET current_date = DATEADD(week, Week_Count-1, start_date);
I'm getting the following errors:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'current_date'.Msg 156, Level 15, State 1, Line 6
Incorrect syntax near the keyword 'current_date'.