The scan has the following parse errors
[10002] Unable to parse T-SQL at C:\Users\DNS\Source\NVCC-Fortify\INPUT\NVCC\Database\App\Tables\NVCC_UsersV2.sql:7:1.
[10002] Unable to parse T-SQL at C:\Users\DNS\Source\NVCC-Fortify\INPUT\NVCC\Database\App\Stored Procedures\NVCC_Rebuild_SensitiveDxCodesTable.sql:46:9.
[10002] Unable to parse T-SQL at C:\Users\DNS\Source\NVCC-Fortify\INPUT\NVCC\Database\App\Stored Procedures\NVCC_Rebuild_SensitiveDxCodesTable.sql:70:14.
[10002] Unable to parse T-SQL at C:\Users\DNS\Source\NVCC-Fortify\INPUT\NVCC\Database\App\Tables\NVCC_UserFacilities.sql:10:1.
[10002] Unable to parse T-SQL at C:\Users\DNS\Source\NVCC-Fortify\INPUT\NVCC\Database\App\Tables\NVCC_SensitiveDxBaseCodes.sql:8:1.
[10002] Unable to parse T-SQL at C:\Users\DNS\Source\NVCC-Fortify\INPUT\NVCC\Database\Security\Permissions.sql:0.
[10002] Unable to parse T-SQL at C:\Users\DNS\Source\NVCC-Fortify\INPUT\NVCC\Database\Security\App.sql:8:7.
WITH Clause in Table CreationThe parser does not recognize the WITH clause in a CREATE TABLE statement. This is a valid construct for the CREATE TABLE statement. See Microsoft's documentation of the CREATE TABLE statement, especially Example N (reproduced below) which has a similar DATA_COMPRESSION option.
CREATE TABLE dbo.T1
(c1 int, c2 nvarchar(200) )
WITH (DATA_COMPRESSION = ROW);
Database\App\Tables\NVCC_UsersV2.sqlCREATE TABLE [App].[NVCC_UsersV2]
(
[UserId] INT IDENTITY (1, 1) NOT NULL PRIMARY KEY,
[UserName] VARCHAR(50) NOT NULL,
[CanAnnounce] BIT NOT NULL DEFAULT 0,
[CanReport] BIT NOT NULL DEFAULT 0
) WITH (DATA_COMPRESSION = PAGE);
Database\App\Stored Procedures\NVCC_Rebuild_SensitiveDxCodesTable.sqlCREATE TABLE [App].[NVCC_SensitiveDxCodes](
[CodingSystem] [varchar](12) NOT NULL,
[Sta3n] [smallint] NULL,
[ICDSID] [int] NULL,
[Code] [varchar](12) NOT NULL,
[DiagnosisText] [varchar](255) NOT NULL,
[AbuseDx] [int] NULL,
[SickleDx] [int] NULL,
[HIVDx] [int] NULL
) ON [DefFG] WITH (DATA_COMPRESSION = PAGE)
Database\App\Tables\NVCC_UserFacilities.sqlCREATE TABLE [App].[NVCC_UserFacilities]
(
[UserFacilityId] INT IDENTITY (1, 1) NOT NULL PRIMARY KEY NONCLUSTERED,
[UserID] INT NOT NULL,
[Sta3n] SMALLINT NOT NULL,
[Sta6a] VARCHAR(50) NULL,
[LastAuthDateTime] DATETIME2(0) NULL,
[ViaB] BIT NULL,
[admin] BIT NOT NULL DEFAULT 0
) WITH (DATA_COMPRESSION = PAGE);
Database\App\Tables\NVCC_SensitiveDxBaseCodes.sqlCREATE TABLE [App].[NVCC_SensitiveDxBaseCodes] (
[CodingSystem] VARCHAR (12) NOT NULL,
[Code] VARCHAR (12) NOT NULL,
[DiagnosisText] VARCHAR (250) NOT NULL,
[AbuseDx] INT NULL,
[SickleDx] INT NULL,
[HIVDx] INT NULL
)
WITH (DATA_COMPRESSION = PAGE);
Database\App\Stored Procedures\NVCC_Rebuild_SensitiveDxCodesTable.sqlThe stated parse error is:
Parse error at line 75, column 1. Encountered: END
However, this is just the close to the BEGIN at the start of the stored procedure declaration. Code parses without error is SSMS and runs without error on database.
Database\Security\Permissions.sqlThe stated parse error is:
Parse error at line 1, column 1. Encountered: DENY
and the entirety of that file is
DENY ALTER
ON SCHEMA::[dbo] TO [uCC_REFDOC];
This is valid T-SQL
DENY ALTERDatabase\Security\App.sqlThe stated parse error is:
Parse error at line 9, column 5. Encountered: ON
and the relevant code is
GRANT UPDATE
ON SCHEMA::[App] TO [uCC_REFDOC_App];
This is valid T-SQL