Forum Discussion
Element115
2 years agoMemorable Member
QUESTION::SQL ENDPOINT::INFORMATION_SCHEMA::QUERY RETURN NOTHING
Why do the following 2 TSQL queries return an empty result set? Also nothing with a WHERE clause on a table name in the LH. SELECT *
FROM INFORMATION_SCHEMA.VIEW_COLUMN_USAGE SEL...
- Anonymous2 years ago
Anonymous
2 years agoNot applicable
Hi Element115
Thanks for using Fabric Community.
If you have any views in the lakehouse, then the queries will return some data.
For example:
I had no views in Lakehouse_2:
In other case I created a view in another lakehouse:
Hope this helps. Please let me know if you have any other questions.
Element115
2 years agoMemorable Member
Actually, I take back my previous answer. I just tried running both TSQL queries on a LH that has a view, and as you can see in my screenshot, it does not work on my end:
- Anonymous2 years agoNot applicable
Hi Element115
How did you create the view? Can you please share the code here?
If you create the view using the tables present in lakehouse, then it would be shown in the sql query result.
- Element1152 years agoMemorable Member
CREATE VIEW vTABLE_NAMES AS SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbo' ;- Anonymous2 years agoNot applicable