-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Example:
var parser = new TSql170Parser(true, SqlEngineType.SqlAzure);
var scalarExpr = parser.ParseExpression(new StringReader("COUNT(*) OVER([col])"), out var errors);
Assert.IsTrue(errors.Count == 0 && scalarExpr != null);
var gen = new Sql170ScriptGenerator(new SqlScriptGeneratorOptions
{
SqlEngineType = SqlEngineType.SqlAzure,
SqlVersion = SqlVersion.Sql170
});
gen.GenerateScript(scalarExpr, out string formattedSql);
Assert.IsTrue(formattedSql == "COUNT(*) OVER [col]");Notice that the OVER clause is invalid as it should be contain a PARTITION or ORDER BY clause, not just a column.
In addition, when the script is formatted with the scriptgenerator, the parens are removed altoghter, which creates an unparsable result.
UPDATE: this was verified with version 170.191.0, which is the latest stable release as of today
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels