Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new SQL Server 2022 "IS [NOT] DISTINCT FROM" TSQL language enhancement. #48

Open
mcenzato opened this issue Jul 23, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request sql-feature

Comments

@mcenzato
Copy link

mcenzato commented Jul 23, 2023

I've updated the package to the last version 161.8901.0 but still the new Sql 2022 TSQL syntax "IS [NOT] DISTINCT FROM" is not reconized and results in a syntax error.
SSMS 19.1 recognizes this, older versions don't.
Try this statment: it works fine if executed but fails in parsing using the package:

DECLARE @i1 int = null;
DECLARE @i2 int = 10;
DECLARE @i3 int = 10;
DECLARE @i4 int = null;
SELECT 
	Test1 = CONCAT('@i1 ', IIF(@i1 IS DISTINCT FROM @i2, '!=', '=='), ' @i2'),
	Test2 = CONCAT('@i1 ', IIF(@i1 IS DISTINCT FROM @i3, '!=', '=='), ' @i3'),
	Test3 = CONCAT('@i1 ', IIF(@i1 IS DISTINCT FROM @i4, '!=', '=='), ' @i4'),
	Test4 = CONCAT('@i2 ', IIF(@i2 IS DISTINCT FROM @i3, '!=', '=='), ' @i3'),
	Test5 = CONCAT('@i2 ', IIF(@i2 IS DISTINCT FROM @i4, '!=', '=='), ' @i4'),
	Test6 = CONCAT('@i3 ', IIF(@i3 IS DISTINCT FROM @i4, '!=', '=='), ' @i4')
@mcenzato mcenzato changed the title Missing "IS [NOT] DISTINCT FROM" support Add support for new SQL Server 2022 "IS [NOT] DISTINCT FROM" TSQL language enhancement. Jul 24, 2023
@dzsquared dzsquared added the enhancement New feature or request label Aug 2, 2023
@chlafreniere chlafreniere self-assigned this Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sql-feature
Projects
None yet
Development

No branches or pull requests

3 participants