I have been using OPENQUERY and WITH RESULTS SETS which has been working well but now I have hit an 8,000 character limit with the column definition and am not sure what to do as all solutions online point to using EXEC to execute the code dynamically but that isn't possible in a view.
Once you exceed 8,000 characters (or about 7,500 when I count them) it fails with this error:
Msg 103, Level 15, State 1, Line 13
The character string that starts with '
SET FMTONLY OFF;
WITH RESULT SETS
TeamNam' is too long. Maximum length is 8000.
Does anyone know any solution to this?