1

On Visual Studio 2019 SSDT. Inside a procedure we have:

create table a (test1 varchar(50))
create table #b (test2 varchar(50))

select a.nop from a

select a.nop from a, #b b where a.test1 = b.test2

The first select gives a warning of columns missing, but the second one doesn't. Is any configuration available to force a warning (or error) on the second select? The moment a temp table is present visual allows anything, even when the missing field has the "a."

  • Are you sure that you want to create a table "a" inside of a stored procedure as opposed to a temp table? That's pretty unusual behavior for a proc. After that, my guess would be missing schema reference like "dbo.a", but usually permanent tables are created outside of stored procedures. – Peter Schott Feb 04 '22 at 16:23
  • The table inside the procedure was for the example. The tables would be created on the model but the second select would still not show a warning or error even when there's no "nop" field on table a. – Fernando Aguilar Feb 05 '22 at 19:47

0 Answers0