New error after most recent update, does anyone else have trouble contacting red-gate support?

statement works okay but formatting gets error:

this statement executes okay, but formatting SQL fails with SQL prompt.
I am unable to contact red-gate support.
Anyone else having issues with red-gate support?

CREATE TABLE Audit_.JsonBatch(
    JsonBatchKey BIGINT IDENTITY(1,1) NOT NULL,
    StartDateTime DATETIME NOT NULL,
    JsonBatchName AS LEFT(REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(30),StartDateTime,120),'-',''),':',''),' ','_'),13) PERSISTED,
    EndDateTime DATETIME NULL,
    UpdateLogin VARCHAR(50) NOT NULL,
    UpdateUserKey BIGINT NOT NULL,
    UpdateDateTime DATETIME NOT NULL,
    FromDateTime DATETIME2(7) GENERATED ALWAYS AS ROW START NOT NULL,
    ThruDateTime DATETIME2(7) GENERATED ALWAYS AS ROW END NOT NULL,
    StartDate  AS (TRY_CAST(StartDateTime AS DATE)) PERSISTED,
    StartTime  AS (TRY_CAST(StartDateTime AS TIME)) PERSISTED,
    StartTime0  AS (TRY_CAST(StartDateTime AS TIME(0))) PERSISTED,
    EndDate  AS (TRY_CAST(EndDateTime AS DATE)) PERSISTED,
    EndTime  AS (TRY_CAST(EndDateTime AS TIME)) PERSISTED,
    EndTime0  AS (TRY_CAST(EndDateTime AS TIME(0))) PERSISTED,
    ElapsedSeconds  AS (CASE WHEN EndDateTime IS NULL THEN TRY_CAST(NULL AS INT) WHEN DATEDIFF(DAY,StartDateTime,EndDateTime)>=(0) AND DATEDIFF(DAY,StartDateTime,EndDateTime)<=(2) THEN DATEDIFF(SECOND,StartDateTime,EndDateTime) ELSE TRY_CAST(NULL AS INT) END) PERSISTED,
    ElapsedMilliSeconds  AS (CASE WHEN EndDateTime IS NULL THEN TRY_CAST(NULL AS INT) WHEN DATEDIFF(DAY,StartDateTime,EndDateTime)>=(0) AND DATEDIFF(DAY,StartDateTime,EndDateTime)<=(2) THEN DATEDIFF(MILLISECOND,StartDateTime,EndDateTime) ELSE TRY_CAST(NULL AS INT) END) PERSISTED,
    ElapsedTime  AS (CASE WHEN EndDateTime IS NULL THEN TRY_CAST(NULL AS TIME) WHEN DATEDIFF(DAY,StartDateTime,EndDateTime)<(0) THEN TRY_CAST(NULL AS TIME) WHEN DATEDIFF(DAY,StartDateTime,EndDateTime)>(2) THEN TRY_CAST(NULL AS TIME) ELSE TRY_CAST(TRY_CONVERT(VARCHAR(10),DATEADD(MILLISECOND,DATEDIFF(MILLISECOND,StartDateTime,EndDateTime),(0)),(114)) AS TIME) END),
    ElapsedTime0  AS (CASE WHEN EndDateTime IS NULL THEN TRY_CAST(NULL AS TIME(0)) WHEN DATEDIFF(DAY,StartDateTime,EndDateTime)<(0) THEN TRY_CAST(NULL AS TIME(0)) WHEN DATEDIFF(DAY,StartDateTime,EndDateTime)>(2) THEN TRY_CAST(NULL AS TIME(0)) ELSE TRY_CAST(TRY_CONVERT(VARCHAR(10),DATEADD(MILLISECOND,DATEDIFF(MILLISECOND,StartDateTime,EndDateTime),(0)),(114)) AS TIME(0)) END),
    ElapsedTimeSoFar  AS (CASE WHEN EndDateTime IS NOT NULL THEN TRY_CAST(NULL AS TIME) WHEN NOT (DATEDIFF(DAY,StartDateTime,GETDATE())>=(0) AND DATEDIFF(DAY,StartDateTime,GETDATE())<=(2)) THEN TRY_CAST(NULL AS TIME) ELSE TRY_CAST(TRY_CONVERT(VARCHAR(10),DATEADD(MILLISECOND,DATEDIFF(MILLISECOND,StartDateTime,GETDATE()),(0)),(114)) AS TIME) END),
    ElapsedTimeSoFar0  AS (CASE WHEN EndDateTime IS NOT NULL THEN TRY_CAST(NULL AS TIME(0)) WHEN NOT (DATEDIFF(DAY,StartDateTime,GETDATE())>=(0) AND DATEDIFF(DAY,StartDateTime,GETDATE())<=(2)) THEN TRY_CAST(NULL AS TIME(0)) ELSE TRY_CAST(TRY_CONVERT(VARCHAR(10),DATEADD(MILLISECOND,DATEDIFF(MILLISECOND,StartDateTime,GETDATE()),(0)),(114)) AS TIME(0)) END),
    CONSTRAINT PK_JsonBatch PRIMARY KEY CLUSTERED(JsonBatchKey),
    PERIOD FOR SYSTEM_TIME (FromDateTime, ThruDateTime)
);



Sign In or Register to comment.