Skip to content

Result filters affect all result set tables instead of just the one they're added to #18883

Closed
@zcoop98

Description

@zcoop98
  • MSSQL Extension Version: 1.28.0
  • VSCode Version: 1.96.4
  • OS Version: Windows 10 Enterprise 10.0.19045 Build 19045

When viewing the "Query Results (Preview)" view to see multiple result sets at once (e.g. results of a script which executes multiple SELECT statements), result filters on any one result set are incorrectly being applied to all result set tables.

My expectation is for the behavior to match ADS, so when I filter on a column, I expect the filter to be applied to that column and that column only, rather than being applied to all tables shown in the results.

Steps to Reproduce:

  1. Execute SQL script which returns multiple result sets (e.g. executes multiple SELECTs)
  2. Attempt to filter a column on any returned table
  3. Filter will attempt to apply to the correspondingly-indexed column on all result tables, instead of just the one

This seems to occur regardless of the data or structure returned, as long as the script returns more than one set.


Here's a gif to demonstrate for clarity:

Image

And a simple sample script if it helps:

DROP TABLE IF EXISTS #TestData;

CREATE TABLE #TestData (Id INT, [Name] VARCHAR(50), [Date] DATE);

INSERT INTO #TestData (Id, [Name], [Date])
VALUES (1, 'Test A', '2025-01-01'), (2, 'Test B', '2025-02-01'), (3, 'Test C', '2025-03-01'), (4, 'Test D', '2025-04-01'), (5, 'Test E', '2025-05-01');

SELECT * FROM #TestData;
SELECT Id, [Date] FROM #TestData;
SELECT [Date], Id, [Name] FROM #TestData WHERE Id > 2;

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions