Closed fmms closed 6 years ago
The alias after the update statement, and the actual tables are being detected as the following type: Microsoft.SqlServer.TransactSql.ScriptDom.NamedTableReference As such there is no simple way of excluding this particular style of alias from being detected as a table. Please note that the b was detected as an alias, as it's after a table, so that is handled. Theoretically I could capture all the alias' used elsewhere in the query, and then try and remove the pseudo table. Tricky, as I will have to add the capability of removing items from the repository, which doesn't exist yet, or some how scan the rest of the statement for alias' and check if the object identified matches a named alias, and not add it to the repository. Code that detects the table in question is in SqlStatement.cs, line 2007.
Fixed in code base. All alias' and CTE's are detected and collected. Any table that has the same name as an alias or CTE is removed from the results before returning from the parser. Passes all the unit tests.
Fixed (as far as possible) in V0.22.0.0 release.
For updating dimensions we have a lot of update tasks that are similar to:
The are displayed as follows in the Dependency Viewer:
However, for sure there is no table [dbo].[a]...