The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am encountering a filtering issue when querying a Lakehouse table using the SQL endpoint in MS Fabric.
Table Structure:
I am querying a table in the Lakehouse using a SQL endpoint.
Example table: [Lakehouse].[Schema].[TableName].
Issue Description:
When I query all rows without any filter using:
SELECT * FROM [Lakehouse].[Schema].[TableName];
I can see all rows, and I am able to locate a specific value (e.g., F1D723AA-5AA8-EB11-B1AC-000D3A8B866C) in the result set by using the search functionality in the UI.
However, when I apply a WHERE clause to filter rows for the same value:
SELECT * FROM [Lakehouse].[Schema].[TableName] WHERE [ColumnName] LIKE '%F1D723AA-5AA8-EB11-B1AC-000D3A8B866C%';
The query does not return any rows, even though the value exists in the table.
Run a full table query (SELECT *) and locate a value manually in the result set.
Apply a WHERE clause using the same value, and observe no results.
Troubleshooting Performed:
Verified the data type of [ColumnName] (it is nvarchar).
Confirmed that the value is correctly formatted in the query.
Checked for trailing spaces or special characters in the data.
I don't experience the same problem when using WHERE clause.
A difference is that I'm using varchar. nvarchar is not supported in Fabric, so I use varchar instead for the searched column. Data types - Microsoft Fabric | Microsoft Learn
Best Regards,
Jing
Community Support Team
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
1 |
User | Count |
---|---|
16 | |
15 | |
11 | |
6 | |
6 |