<?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 Use a constant in a SQL Query in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Use-a-constant-in-a-SQL-Query/m-p/20295#M4359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a User Input Variable that shows a list of snapshots for a volume based off of a SQL query.&amp;nbsp; I also have defined a Constant that contains the name of the volume we need a list of snapshots for.&amp;nbsp; I am using a Constant because the end user should not be able to select another volume.&amp;nbsp; How can i reference the constant in the SQL Query?&amp;nbsp; I can reference a User Input Variable using the following, but how to I reference the constant?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT snapshot.name&lt;/P&gt;&lt;P&gt;FROM storage.snapshot, storage.volume&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;volume_id = volume.id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AND volume.name = ${source_volume}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to put a contant in place for ${source_volume}.&amp;nbsp; I know i could just do 'myVolumeName' but I'd rather reference my already defined constant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 06:00:49 GMT</pubDate>
    <dc:creator>slair</dc:creator>
    <dc:date>2025-06-05T06:00:49Z</dc:date>
    <item>
      <title>Use a constant in a SQL Query</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Use-a-constant-in-a-SQL-Query/m-p/20295#M4359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a User Input Variable that shows a list of snapshots for a volume based off of a SQL query.&amp;nbsp; I also have defined a Constant that contains the name of the volume we need a list of snapshots for.&amp;nbsp; I am using a Constant because the end user should not be able to select another volume.&amp;nbsp; How can i reference the constant in the SQL Query?&amp;nbsp; I can reference a User Input Variable using the following, but how to I reference the constant?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT snapshot.name&lt;/P&gt;&lt;P&gt;FROM storage.snapshot, storage.volume&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;volume_id = volume.id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AND volume.name = ${source_volume}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to put a contant in place for ${source_volume}.&amp;nbsp; I know i could just do 'myVolumeName' but I'd rather reference my already defined constant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:00:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Use-a-constant-in-a-SQL-Query/m-p/20295#M4359</guid>
      <dc:creator>slair</dc:creator>
      <dc:date>2025-06-05T06:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use a constant in a SQL Query</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Use-a-constant-in-a-SQL-Query/m-p/20300#M4362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, it is not possible for the SQL query to reference the constant defined in the workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the scenario mentioned above, can you have a different user input like $Volume which is defined with the default value as the volume name that you would like&lt;/P&gt;&lt;P&gt;or as a locked Enum which has just one enum value (the hard-coded name of the volume). You could show&amp;nbsp; that in the workflow and then the snapshot query can reference the volume name like above. Will that work for you ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shailaja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 06:19:22 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Use-a-constant-in-a-SQL-Query/m-p/20300#M4362</guid>
      <dc:creator>shailaja</dc:creator>
      <dc:date>2013-06-13T06:19:22Z</dc:date>
    </item>
  </channel>
</rss>

