keif888 / SQLServerMetadata

SQL Server Metadata Toolkit
Microsoft Public License
82 stars 32 forks source link

Error Number: 46010 #37

Closed CarlienM-discovery closed 2 years ago

CarlienM-discovery commented 2 years ago

Hi there. Any idea why I get 100's of 46010 errors when running the dependency analyzer?

keif888 commented 2 years ago

The Parser that is being used is Microsoft's Parser that SSDT uses. There are a number of bugs within that Parser that have been fixed over time, but this project hasn't been updated to use the fixed parser. eg. https://developercommunity.visualstudio.com/t/ssdt-incorrectly-highlighting-syntax-issue-sql4601/790403 And this one is still open: https://developercommunity.visualstudio.com/t/iif-in-codition-sql46010-incorrect-syntax-near/1578715

Without an example of an SQL Statement that is causing the issue to be raised, I'm unable to confirm this.

keif888 commented 2 years ago

I've assumed that the issue is ODBC call's to stored procedures. This is fixed in https://github.com/keif888/SQLServerMetadata/releases/tag/v0.28.0.0-beta

CarlienM-discovery commented 2 years ago

Thank you . I will check today. Have been just snowed under with work :-) Thanks again. Much appreciated.

CarlienM-discovery commented 2 years ago

Thank you. I have reinstalled - still getting some errors. Will look if i can do some analysis later today. From just watching the parsing - it might queries running on Oracle. Let me do some work on this. Thank you once again.

CarlienM-discovery commented 2 years ago

Checked - it seems it is an issue with our scripts. "SQL Server does not support CURRENT_DATE function" A lot of our devs are previous Oracle devs and use "current_date" everywhere :-) Thank you for all the effort on your side.