Comments
1 comment
- 
                
                  
                
                Thank you for the detailed recreation steps! I think I have a fix and I've made a private build for you which you can download from here.
Note: the private build only had minimal testing so if you'd rather stay with 6.1.0.101 then a work around would be to give the variable an alias which prompt will then qualify the column with. 
Add comment
Please sign in to leave a comment.
DECLARE @MyTable TABLE ( ID INT NOT NULL PRIMARY KEY, Name VARCHAR(200) NOT NULL, [Address] VARCHAR(200) NULL ); INSERT INTO @MyTable ( ID, Name, Address ) VALUES ( 1, -- ID - int 'test', -- Name - varchar(200) '123 Main St.' -- Address - varchar(200) ) SELECT * FROM @MyTable WHERE ID = 1;If you run "Qualify Object Names" on this code (SSMS 2012 SP1, SQL Prompt 6.1.0.101), it transforms the last line to say...
...which is invalid SQL.