Null Reference Exception #124
jim-gregorio
started this conversation in
General
Replies: 1 comment
-
Thank you for reporting this. I've created an Issue to track this, #125 . I'll verify the reproduction and update with my findings. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
We are using tsql-parser as the foundation for SQL validation. When the following query is parsed it throws a null reference exception.
here is the call stack:
This can be reproduced using the following query:
select Stuff((Select ', ' + i.name from sysindexes i where i.id = sys.id order by i.name FOR XML PATH(''),TYPE).value('text()[1]','varchar(max)'),1,2,'') as 'indexes' from sysobjects sys where sys.name like 'DF%'
On SQL Server 2017 or later this can be rewritten to use the string_agg function instead of using for xml. However some servers are 2016 and cannot leverage this function.
Please let me know what you think this can and should be resolved.
Regards.
Beta Was this translation helpful? Give feedback.
All reactions