6.5.0.320 - semicolon in wrong place
PDinCA
Posts: 642 Silver 1
A valid chunk of DDL is selected, then "Format SQL" is chosen, but there shouldn't be a semicolon after the last selected character.
CREATE TABLE util.SiteTableArchival ( SiteID int NOT NULL , TableID smallint NOT NULL , StatusCode tinyint CONSTRAINT cn_sta_df_StatusCode DEFAULT 0 NOT NULL , CreatedTS_UTC datetime CONSTRAINT cn_sta_df_CreatedTS_UTC DEFAULT GETUTCDATE() NOT NULL , LatestStatusTS_UTC datetime CONSTRAINT cn_sta_df_LatestStatusTS_UTC DEFAULT GETUTCDATE() NOT NULL , ArchiveFilePathAndName nvarchar(4000) NULL ) ON [PRIMARY] GOBut only highlight this part:
CREATE TABLE util.SiteTableArchival ( SiteID int NOT NULL , TableID smallint NOT NULL , StatusCode tinyint CONSTRAINT cn_sta_df_StatusCode DEFAULT 0 NOT NULL , CreatedTS_UTC datetime CONSTRAINT cn_sta_df_CreatedTS_UTC DEFAULT GETUTCDATE() NOT NULL , LatestStatusTS_UTC datetime CONSTRAINT cn_sta_df_LatestStatusTS_UTC DEFAULT GETUTCDATE() NOT NULL , ArchiveFilePathAndName nvarchar(4000) NULL )Then "Format SQL", the resulting code is:
CREATE TABLE util.SiteTableArchival ( SiteID int NOT NULL , TableID smallint NOT NULL , StatusCode tinyint CONSTRAINT cn_sta_df_StatusCode DEFAULT 0 NOT NULL , CreatedTS_UTC datetime CONSTRAINT cn_sta_df_CreatedTS_UTC DEFAULT GETUTCDATE() NOT NULL , LatestStatusTS_UTC datetime CONSTRAINT cn_sta_df_LatestStatusTS_UTC DEFAULT GETUTCDATE() NOT NULL , ArchiveFilePathAndName nvarchar(4000) NULL ); ON [PRIMARY] GO
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...
Decide wisely...
Comments
Thanks for letting us know about this - it looks like it was a knock on from the bug fix for the issue reported here. We were previously using the entire script but that meant we also included errors outside the selection so we changed it so it to only considered the selected text which results in what you're seeing. We'll see if there's a middle ground between the two.
Thanks,
Aaron.
Thanks,
Aaron.
Decide wisely...