Forum Discussion

Pradeepsingh's avatar
Pradeepsingh
Regular Visitor
1 year ago

undefiQuery Issue in MS Fabric Lakehouse SQL Endpoint

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.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pradeepsingh 

     

    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