Open IVNSTN opened 9 months ago
Hi, thanks for reaching out to us. One question, are you also not able to deploy the project, or it is just the warning?
Sorry for misunderstanding
SQL71501
error because t.missing_col
really does not exist, build fails, I'm not able to deploy the project - this is good and expected behavior#
or table variable @
used in the same broken query, DacFx does not detect SQL71501
, no error or warning shown, build succeeds, I'm able to deploy the project with this broken proc and the proc fails at runtime only - tihs is bad and unexpected behaviorWhy doesn't DacFx detect missing column reference if temp table or table variable used in query? I think it should detect this broken reference.
SQL71501 does not work if a statement includes temp table or table variable reference.
Steps to Reproduce:
SELECT t.missing_col
in SP which is expecteddbo.another_table
in the select statement with#another_table
or@another_table
dbo.another_table
- the warning is backIt looks like a bug or feature limitation. But the statement is so trivial and column is qualified with table alias. It'd be great if the missing column reference warning worked even if
#
or@
involved at least in cases like described one where column belonging seems to be identifiable.#
and@
are underlined on screenshot because they are unused. These hints are not related to the issue.Did this occur in prior versions? If not - which version(s) did it work in?
(DacFx/SqlPackage/SSMS/Azure Data Studio)