Kingswaysoft has recently updated their SQL2Fetch Convertor
Let’s say you are moving from CRM On premises to CRM Online and you want to update your reports to work with CRM Online, you can take the SQL query from your report, paste it in the SQL box and click the “convert” button to generate FetchXML.
This tool won’t be able to handle the most complex SQL, but it is a big timesaver for normal SQL queries. I also find it very useful when writing a query for CRM Online–I can write the query in T-SQL and convert it to FetchXML.
Daniel Cai has requested feedback on this tool In the Dynamics CRM Facebook group. See the post here.
doesn’t work at all, nothing displayed in the Generated FetchXML box even after 10 minutes of wait. The circle on the tab keeps rotating infinitely.
It can work, with patience and within limits:
http://www.sql2fetchxml.com/ is a nice looking tool and a great idea but unfortunately it currently has more bugs/limitations than stated. Not all of the errors it reports are true errors, some are bugs/limitations of the convertor rather than of FetchXML. It has problems with capitalization sometimes, doesn’t handle braces (parenthesis) and cannot the convert Microsoft’s Left Outer Join example in their FetchXML pages, ref. https://msdn.microsoft.com/en-gb/library/dn531006.aspx 🙁 The latter is a particular problem because FetchXML does not support SQL alternatives such as: NOT IN/NOT EXISTS/EXCEPT for excluding certain records. The convertor also can’t handle nested selects but that may well be a limitiation of FetchXML(?).
If you can get some of your SQL to convert, finishing by hand can be straightforwar as FetchXML has a fairly simple structure – perhaps simpler/clearer than SQL, LINQ,…?