Comments
13 comments
-
I have tried resolutions proposed in this thread, but to no avail. this is frustrating and ridiculous.
https://forum.red-gate.com/discussion/88937/error-parsing-file-while-committing-stored-procedure-and-table
-
FYI, the version I am on is 7.7.0.18212
-
It turns out that the new version of Source Control has an issue with the word 'window'. Probably need to patch that. Enclosing it with brackets, as in [window] seems to work
-
What version of SQL Server? Window is a reserved word: https://learn.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-ver16
You can't use that as an identifier -
Version 14.0.345.
-
According to the link you sent, Window *could* be reserved in a future version. Maybe make the error that is generated a bit more descriptive so that people do not have to go line-by-line trying to find the offending string.
-
Window is reserved as of SQL 2022. It was marked at some point in the past as this was added to ANSI SQL. This isn't a word that should be used as an identifer.
That being said, it's valid in SQL 2017, and we shouldn't throw an error on it, in SC or Prompt. Prompt appears to work, and if I connect SQL Source Control to SQ L2017 (14.0.3465) with SOC v 7.6.34.18144 and this code works:CREATE TABLE window(myid INT);
I'd like to know what code you are having an issue with, what version of source control to reproduce this. If you can't post code here, you can email to support@red-gate.com and ref this post URL. -
Here is the code that was breaking, but it was the code up in Azdo throwing the error during "Pull from remote repository".
CREATE PROC sp$temp$proc
AS
SET NOCOUNT ON;
BEGINDECLARE @tTABLE (ShipmentId INT,[Mode] VARCHAR(15),ArriveTime DATETIME,WaitTimeMinutes INT,Which VARCHAR(20),SLID INT,Window INT,[Interval] INT,LegId INT)
END
-
Parses for me if I do this in the server. Is this manually written code committed in git as a file?
We use specific formats for code as we generate this for text storage. I might be wrong, but I don't think we support manually editing/adding sql files. -
The offending code was part of a stored proc that worked fine for years and caused no errors up until I upgraded to the latest version of Source Control (7.7.0.18212). Suddenly, it was an issue.
-
Hi stango
The team have identified the issue and are looking into it. Will let you know when I have some more information. -
Hi stango
If you encapsulate "Window" into square brackets "[window]" you should not experience the problem.Window
is a new SQL Server reserved keyword for which we added support recently, hence the error your getting.
The team are looking into this will let you know when I have a further update. -
Hi stango
This issue has been fixed in version 15.3.3 of Schema Compare and version 6.0.22 of Source control for oracle
Add comment
Please sign in to leave a comment.
When I run Get Latest, I get the attached message
I have already tried restarting and this momentarily fixed it on a single environment, but then it started happening again. The sql syntax is valid and the stored proc operates correctly.
I have also tried locally modifying the file and pulling it down again, but that does not work either.
I am unable to support my dev team now because I can no longer use this tool.
Please help.