The error message is: Additional information: Unexpected symbol 'GROUP' D:\projects\......\Schema\Stored
Procedures\etl_deeds_bulk.A1a_spExamine_ClearancesProvinces.sql (3, 15)
This is the contents of the file in the scripts folder (and it's the same in database, i.e. table, schema names etc. are all valid)
Code: Select all
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [etl_deeds_bulk].[A1a_spExamine_ClearancesProvinces]
AS BEGIN
SELECT
srcClearance, srcProvince, srcTownship, srcRegistrationDivision, srcErfNo,
COUNT(1) AS Count
FROM
etl_deeds_bulk._Standard_Property
WHERE
(srcID_type1 >= etl_deeds_bulk.fnType1_ID_Range_Lowest() AND srcID_type1 <= etl_deeds_bulk.fnType1_ID_Range_Highest())
GROUP BY
srcClearance, srcProvince, srcTownship, srcRegistrationDivision, srcErfNo
ORDER BY
srcClearance, Count DESC
END
GO