<?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: Issue with Multiple Data Queries in Single Data Query Codefile in SAS Intelligent Decisioning: V in Decisioning</title>
    <link>https://communities.sas.com/t5/Decisioning/Issue-with-Multiple-Data-Queries-in-Single-Data-Query-Codefile/m-p/949226#M136</link>
    <description>&lt;P&gt;The Data Query node is designed to run a single query that will return the result either as a data grid or a list of scalar variables. You cannot run multiple queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a couple of ideas to consider:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You could look at using multiple data query nodes in your decision, with a single query for each type, then in a subsequent ruleset or DS2 code file you could combine the results from those data query nodes into one.&lt;/LI&gt;
&lt;LI&gt;Another possible option to consider is a Data Query node that does not query on type, and then in a subsequent node have some logic that splits the result based on the type returned.&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Mon, 28 Oct 2024 13:25:29 GMT</pubDate>
    <dc:creator>DeanTaplin</dc:creator>
    <dc:date>2024-10-28T13:25:29Z</dc:date>
    <item>
      <title>Issue with Multiple Data Queries in Single Data Query Codefile in SAS Intelligent Decisioning: Viya4</title>
      <link>https://communities.sas.com/t5/Decisioning/Issue-with-Multiple-Data-Queries-in-Single-Data-Query-Codefile/m-p/949210#M135</link>
      <description>&lt;P&gt;Hi SAS Community,&lt;/P&gt;&lt;P&gt;I’m working with SAS Intelligent Decisioning on Viya 4 to build a decision flow that includes a data query object. My goal is to assign coefficients to each policy based on the Sum Insured value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a policy data table as follows:&lt;BR /&gt;Policy_ID Vehicle_Sum_Insured&lt;BR /&gt;1 1050&lt;BR /&gt;2 2000&lt;BR /&gt;3 3050&lt;BR /&gt;4 3000&lt;BR /&gt;5 1006&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Additionally, I’ve created a separate SAS table that categorizes Sum Insured values into buckets with corresponding coefficients by various types. This table is getting used by data queries to pull appropriate coefficients for each policy.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS data table.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101830i8E81E1565EE79122/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS data table.png" alt="SAS data table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Query.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101831iBC44CE3ABBDA04CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Query.png" alt="Query.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue: I’ve successfully written a data query to fetch the appropriate coefficients for each policy based on type and the Sum Insured bucket. When I run the file with just one query, I am able to fetch the values of coefficients. However, when I attempt to add two or more queries in the same data query file, I encounter an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details of the error message are as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error 1.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101832i218C7A2645EF7956/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error 1.png" alt="Error 1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(RHS extension of the above error message)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error 2.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101833iEA421CAE20FE4418/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error 2.png" alt="Error 2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone experienced similar issues with multiple data queries in one file? Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 10:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Decisioning/Issue-with-Multiple-Data-Queries-in-Single-Data-Query-Codefile/m-p/949210#M135</guid>
      <dc:creator>saunvida</dc:creator>
      <dc:date>2024-10-28T10:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Multiple Data Queries in Single Data Query Codefile in SAS Intelligent Decisioning: V</title>
      <link>https://communities.sas.com/t5/Decisioning/Issue-with-Multiple-Data-Queries-in-Single-Data-Query-Codefile/m-p/949226#M136</link>
      <description>&lt;P&gt;The Data Query node is designed to run a single query that will return the result either as a data grid or a list of scalar variables. You cannot run multiple queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a couple of ideas to consider:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You could look at using multiple data query nodes in your decision, with a single query for each type, then in a subsequent ruleset or DS2 code file you could combine the results from those data query nodes into one.&lt;/LI&gt;
&lt;LI&gt;Another possible option to consider is a Data Query node that does not query on type, and then in a subsequent node have some logic that splits the result based on the type returned.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 28 Oct 2024 13:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Decisioning/Issue-with-Multiple-Data-Queries-in-Single-Data-Query-Codefile/m-p/949226#M136</guid>
      <dc:creator>DeanTaplin</dc:creator>
      <dc:date>2024-10-28T13:25:29Z</dc:date>
    </item>
  </channel>
</rss>

