SQL text cannot be represented in the grid pane and diagram pane

Dear All,

I have a query which brings the results of Financial Account Statement. I need to create this as a View.The Query is giving me perfect results!. But When I convert it into View,its showing the error,
"SQL text cannot be represented in the grid pane and diagram pane.". I ignored it and created the view . Its showing the results correctly. This View has to integrated with a third party DB (linked server), say MySQL. If I ignore this warning and proceed , will that cause any issues in viewing the results in third party DB.

Please see the below View that is created for this purpose. Can anyone suggest what part of the query is causing this issue?

SELECT MainQuery.Code, mainquery.Description, MainQuery.CompanyCode, MainQuery.BusinessUnitCategory, mainquery.CalendarYTDDebit, CalendarYTDCredit
FROM (SELECT DISTINCT
gl.code, fp.Description, gp.fCompanyCode AS CompanyCode, bu.fTableField1Code AS BusinessUnitCategory, gp.fbusinessunitcode, CalendarYTDDebit = sum(gp.debitvalue)
OVER (Partition BY gl.code, gp.fcompanycode, gp.fbusinessunitcode, Year(fp.enddate)
ORDER BY fp.enddate), CalendarYTDCredit = sum(gp.CreditValue) OVER (Partition BY gl.code, gp.fcompanycode, gp.fbusinessunitcode, Year(fp.enddate)
ORDER BY fp.enddate)
FROM ESGLAccountPeriodics gp LEFT JOIN
ESGOFiscalPeriod fp ON fp.gid = gp.fFiscalPeriodGID LEFT JOIN
ESGOFiscalYear fy ON fy.gid = gp.fFiscalYearGID LEFT JOIN
esglaccount gl ON gl.gid = gp.fAccountGID LEFT JOIN
ESGOZBusinessUnit bu ON bu.Code = gp.fBusinessUnitCode
WHERE gl.ChartOfAccounts = 0 AND year(fy.BeginDate) = year(getdate()) AND gl.FlagField2 = 1
GROUP BY gl.code, fp.Description, fp.EndDate, gp.DebitValue, gp.CreditValue, gp.fCompanyCode, bu.fTableField1Code, gp.fBusinessUnitCode
UNION
SELECT DISTINCT gl.code, fp.Description, '' AS CompanyCode, '' AS BusinessUnitCategory, '' AS fbusinessunitcode, CalendarYTDDebit = sum(gp.debitvalue) OVER (Partition BY gl.code, Year(fp.enddate)
ORDER BY fp.enddate), CalendarYTDCredit = sum(gp.CreditValue) OVER (Partition BY gl.code, Year(fp.enddate)
ORDER BY fp.enddate)
FROM ESGLAccountPeriodics gp LEFT JOIN
ESGOFiscalPeriod fp ON fp.gid = gp.fFiscalPeriodGID LEFT JOIN
ESGOFiscalYear fy ON fy.gid = gp.fFiscalYearGID LEFT JOIN
esglaccount gl ON gl.gid = gp.fAccountGID
WHERE gl.ChartOfAccounts = 0 AND year(fy.BeginDate) = year(getdate()) AND gl.FlagField2 = 0
GROUP BY gl.code, fp.Description, fp.EndDate, gp.DebitValue, gp.CreditValue) MainQuery

Thanks in Advance to all!!

This seems that it's a SSMS problem, when you are trying to use view graphical designer.

Just open a new query and write into it :

create view  schName.viewName
as
SELECT MainQuery.Code, mainquery.Description, MainQuery.CompanyCode, MainQuery.BusinessUnitCategory, mainquery.CalendarYTDDebit, CalendarYTDCredit
FROM (SELECT DISTINCT ...

if you can query the view from a query , then should not be any issues with third party DB

Thankyou for your reply. I created the view already and is displaying results as well. But my concern is : This has to be integrated with a third party DB(mySQL) . When they try to get the results from this view , will that cause any issues. I dont have access to that third party DB to test it.

Thanks In Adance!

If you can select data from the view , from any place (like a new query, a new stored procedure , a new DB ) , then should not be any issues with third party DB