Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zcoop98 opened this issue Feb 28, 2025 · 2 comments
Assignees

Comments

@zcoop98
Copy link

zcoop98 commented Feb 28, 2025

  • 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;
@zcoop98 zcoop98 changed the title Filters on results affect all result tables instead of just one, when results contain multiple sets/ tables Result filters affect all result set tables instead of just the one they're added to Feb 28, 2025
@Benjin
Copy link
Contributor

Benjin commented Feb 28, 2025

I think we've fixed this one in the February release, with #18602

@zcoop98 Can you update to 1.29 and see if it's still occurring?

@zcoop98
Copy link
Author

zcoop98 commented Feb 28, 2025

Sweet! Confirmed, looks good to me!

Image

Apologies for not checking the latest version first. Thanks!

@zcoop98 zcoop98 closed this as completed Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants