<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: unable to save workflow - malformed SQL in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61867#M12879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw the bug and it looks like it still exists in WFA 2.2RC1, so upgrading won't help.&lt;/P&gt;&lt;P&gt;Your recommendation worked, removing the parentheses from the first select statement was sufficient to save the query and it keeps the 'order by' clause working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2014 06:56:05 GMT</pubDate>
    <dc:creator>nscherer</dc:creator>
    <dc:date>2014-05-13T06:56:05Z</dc:date>
    <item>
      <title>unable to save workflow - malformed SQL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61854#M12874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to save a workflow (WFA 2.1) and get an error message stating&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save Workflow Failure&lt;/P&gt;&lt;P&gt; java.lang.RuntimeException: An unexpected error has occurred while attempting to format SQL. It may be that the SQL provided is not well formed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is caused by SQL for a user input, after removing the SQL code I can save the workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to work around it? The SQL code is working fine when previewing the workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is the SQL code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( SELECT quota.target AS target&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM storage.quota AS quota&lt;/P&gt;&lt;P&gt;&amp;nbsp; WHERE NOT STRCMP('${QuotaType}','Project Folder') AND&lt;/P&gt;&lt;P&gt;&amp;nbsp; SUBSTRING_INDEX(SUBSTRING_INDEX(quota.target,'/',-2),'/',1) IN&lt;/P&gt;&lt;P&gt;&amp;nbsp; (&amp;nbsp; SELECT vol.name AS target FROM storage.volume AS vol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN storage.resource_group_member AS rgm ON rgm.volume_id = vol.id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN storage.resource_group AS rg ON rg.id = rgm.group_id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE rg.name = 'WFA_NAS_ProjectVolumes' )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;UNION ALL&lt;/P&gt;&lt;P&gt;( SELECT DISTINCT SUBSTRING_INDEX(uquota.user_name,'\\',-1) AS target&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM storage.user_quota AS uquota&lt;/P&gt;&lt;P&gt;&amp;nbsp; WHERE NOT STRCMP('${QuotaType}','User Home Drive') AND&lt;/P&gt;&lt;P&gt;&amp;nbsp; uquota.user_name LIKE CONCAT('${Domain}','\\\%')&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;ORDER BY target&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:36:31 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61854#M12874</guid>
      <dc:creator>nscherer</dc:creator>
      <dc:date>2025-06-05T05:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: unable to save workflow - malformed SQL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61858#M12876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a known issue and there is a BUG that had been raised to fix it as well.&lt;/P&gt;&lt;P&gt;The SQL formatter fails on the UNION if paranthesis is used.&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;SELECT quota.target AS target&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp; FROM storage.quota AS quota&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp; WHERE NOT STRCMP('${QuotaType}','Project Folder') AND&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp; SUBSTRING_INDEX(SUBSTRING_INDEX(quota.target,'/',-2),'/',1) IN&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp; (&amp;nbsp; SELECT vol.name AS target FROM storage.volume AS vol&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN storage.resource_group_member AS rgm ON rgm.volume_id = vol.id&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN storage.resource_group AS rg ON rg.id = rgm.group_id&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE rg.name = 'WFA_NAS_ProjectVolumes' )&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;UNION ALL&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;SELECT DISTINCT SUBSTRING_INDEX(uquota.user_name,'\\',-1) AS target&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp; FROM storage.user_quota AS uquota&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp; WHERE NOT STRCMP('${QuotaType}','User Home Drive') AND&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;&amp;nbsp; uquota.user_name LIKE CONCAT('${Domain}','\\\%')&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, Verdana, sans-serif; color: #454545; background-color: #ffffff;"&gt;ORDER BY target&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have just removed the paranthesis from the two queries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2014 06:41:33 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61858#M12876</guid>
      <dc:creator>ag</dc:creator>
      <dc:date>2014-05-11T06:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: unable to save workflow - malformed SQL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61867#M12879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw the bug and it looks like it still exists in WFA 2.2RC1, so upgrading won't help.&lt;/P&gt;&lt;P&gt;Your recommendation worked, removing the parentheses from the first select statement was sufficient to save the query and it keeps the 'order by' clause working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 06:56:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61867#M12879</guid>
      <dc:creator>nscherer</dc:creator>
      <dc:date>2014-05-13T06:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: unable to save workflow - malformed SQL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61872#M12881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nico,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You are right bug 806754 is not fixed in 2.2RC1R1 or the GA release as well.&lt;/P&gt;&lt;P&gt;May I request you to open a case with NetApp Support for the same so that this gets prioritized ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;adai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 07:46:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/unable-to-save-workflow-malformed-SQL/m-p/61872#M12881</guid>
      <dc:creator>adaikkap</dc:creator>
      <dc:date>2014-05-13T07:46:10Z</dc:date>
    </item>
  </channel>
</rss>

