I am not able to execute a lot of T-SQL statements due to various errors. The statements are basically some CREATE OR ALTER statements of routines. I guess I have turned on/off option of SQL Server Management Studio to force these errors because everything was working OK earlier.
For example the following code:
DECLARE @TEST1 DATETIME2 = SYSDATETIME();
DECLARE @TEST2 BIT;
gives this:
If I execute only one of the lines or the following:
DECLARE @TEST1 DATETIME2
SET @TEST1 = SYSDATETIME();
DECLARE @TET2 BIT;
everything is OK.
This cannot be due to SQL Server version/setting or hardware, because the query is working fine on other laptop.
I was using SSMS 18.0, then updated to SSMS 18.1 and nothing change.
Has anyone idea what is causing this?

