SSDT gets inconsistent compile result on non-existent column
@llali is already working on this.
Since Oct 30, 2024.
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
- SqlPackage or DacFx Version: 1.0.0.0, the default one
- .NET Framework (Windows-only) or .NET Core: .Net Framework 4.7.2
- Environment (local platform and source/target platforms): SQL Server 2019 or above
**Steps to Reproduce:**
1. Open the attached project, build it you will get the SQL71501 error
2. Change the testsp.sql query to below, build it again, the compile will succeed even the Id3 still not exists
CREATE PROCEDURE [dbo].[testsp]
AS
SELECT
DISTINCT col1
INTO #Reset
FROM tb1 AS tmpo
SELECT c.col1,tb1.col1,v1.Id3 FROM
tb1
left join #Reset as c on c.col1=tb1.col1
left join v1 on tb1.col1=v1.Id3
[SSDTTest.zip](https://github.com/user-attachments/files/17565521/SSDTTest.zip)
**Did this occur in prior versions? If not - which version(s) did it work in? Not sure, it can be reproduced on both SSDT 2017 and 2022
(DacFx/SqlPackage/SSMS/Azure Data Studio)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.