TSQLStatementReader.ParseStatements throws Object reference not set to an instance of an object. exception #92
-
I am trying to parse this select statement
but the method TSQLStatementReader.ParseStatements() throws
stack trace
Kindly help me out if I am missing something or that's the expected behavior. This is how I'm doing:
I am using nuget package version: 2.1.0 interestingly if I change the select statement to this
I just added a FROM clause and it works, it gives me the statement and tokens. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thank you for bringing this up. I've created an issue from it, #93 . I think the problem is stemming from an intermix of system "variables" and system "functions". In the previous major version, the differentiation didn't matter, because there wasn't any context aware parsing. With the new context aware parsing, I think it's considering this a function, and trying to parse arguments, but also it shouldn't even matter because it should bail out at the end of the string, which it's also not. So please give me some time, a few days or so, to review and think on this one. It's likely to spawn fixes within multiple sections, instead of just fixing directly for this specific situation. In the meantime, you can pin to the last release of the previous major version v1.5.3, prior to the contextual parsing, and it likely won't have this issue. |
Beta Was this translation helpful? Give feedback.
Thank you for bringing this up. I've created an issue from it, #93 .
I think the problem is stemming from an intermix of system "variables" and system "functions". In the previous major version, the differentiation didn't matter, because there wasn't any context aware parsing. With the new context aware parsing, I think it's considering this a function, and trying to parse arguments, but also it shouldn't even matter because it should bail out at the end of the string, which it's also not.
So please give me some time, a few days or so, to review and think on this one. It's likely to spawn fixes within multiple sections, instead of just fixing directly for this specific situation. In the m…