I have a query that has been working for 6 months. All of a sudden it started giving me the error "Invalid length parameter passed to the RIGHT function". That query contains serveral select queries that are UNIONed together. A RIGHT() function is in one of those select queries. When I ran the select queries seperately, they all worked fine. But when I ran them together with the UNION, I got the error. This is very confusing.
The error went away after I put additional filtered in the query with Right() function. The additional filter is not necessary. But it got rid of the error.
My theory is that when SQL server parses the query, the Right() was verified against data that will be filtered out by the WHERE clause. I hope there is a way to verify that.
Power BI Copilot AI Instructions: Helping Users Understand The Scope Of The
Data
-
Continuing my series of posts on Power BI Copilot and the type of things
you should be including in AI Instructions, today I want to talk about
helping the...
1 day ago
No comments:
Post a Comment