<?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 EG 7.1 Query Builder &amp;quot;Item has already been added.  Key in Dictionary&amp;quot; Error on Modify in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/271680#M18823</link>
    <description>&lt;P&gt;My organization is running EG 7.1 on SAS 9.4 and uses Query Builder extensively. &amp;nbsp;Occassionally, we will receive an error (in apop up / dialog box) that reads...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Item has already been added. &amp;nbsp;Key in dictionary: 'ColumnName' Key being added: 'ColumnName'"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where ColumnName is the name of a calculated column created in that query node.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error prevents you from editing the query&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt;&lt;/U&gt; still allows you to run the query and it successfully builds a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculated column in particular is just a simple TRIM statement.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* ItemOrig */
(TRIM(t2.'Item#'n)) LABEL="ItemOrig" AS ItemOrig, &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One solution is to just grab the code and make a program node instead. &amp;nbsp;This doesn't work for my organization since most people are reliant on the GUI to manipulate the SQL underneath.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other solution is to recreate the query in a new Query Builder node but this particular query is 152 lines of code with several complicated Case Statements and very specific naming of columns and labels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error has happened several times after we transitioned over to 7.1 but I have seen other posts having this issue on 5.1 as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone else having this issue with 7.1 and has anyone found a solution for it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any guidance.&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2016 11:33:35 GMT</pubDate>
    <dc:creator>_WJ</dc:creator>
    <dc:date>2016-05-19T11:33:35Z</dc:date>
    <item>
      <title>EG 7.1 Query Builder "Item has already been added.  Key in Dictionary" Error on Modify</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/271680#M18823</link>
      <description>&lt;P&gt;My organization is running EG 7.1 on SAS 9.4 and uses Query Builder extensively. &amp;nbsp;Occassionally, we will receive an error (in apop up / dialog box) that reads...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Item has already been added. &amp;nbsp;Key in dictionary: 'ColumnName' Key being added: 'ColumnName'"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where ColumnName is the name of a calculated column created in that query node.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error prevents you from editing the query&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt;&lt;/U&gt; still allows you to run the query and it successfully builds a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculated column in particular is just a simple TRIM statement.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* ItemOrig */
(TRIM(t2.'Item#'n)) LABEL="ItemOrig" AS ItemOrig, &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One solution is to just grab the code and make a program node instead. &amp;nbsp;This doesn't work for my organization since most people are reliant on the GUI to manipulate the SQL underneath.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other solution is to recreate the query in a new Query Builder node but this particular query is 152 lines of code with several complicated Case Statements and very specific naming of columns and labels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error has happened several times after we transitioned over to 7.1 but I have seen other posts having this issue on 5.1 as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone else having this issue with 7.1 and has anyone found a solution for it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any guidance.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 11:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/271680#M18823</guid>
      <dc:creator>_WJ</dc:creator>
      <dc:date>2016-05-19T11:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: EG 7.1 Query Builder "Item has already been added.  Key in Dictionary" Error on Modify</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/271683#M18824</link>
      <description>&lt;P&gt;Well, sounds like a probable bug in the query builder. &amp;nbsp;I recommend that you work with SAS Tech Support on this -- they'll probably want a copy of your project file (if possible) so R&amp;amp;D can see what's happening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some other possible workarounds:&lt;/P&gt;
&lt;P&gt;- create a query template and see if that allows you to build an editable query. &amp;nbsp;(On the Query&amp;nbsp;&lt;STRONG&gt;RUN&lt;/STRONG&gt; button, drop down to Create Template... option. &amp;nbsp;Then open that template from Tasks-&amp;gt;Task Templates menu.)&lt;/P&gt;
&lt;P&gt;- does it happen only with tables that have nonstandard variable names ("Item#")? &amp;nbsp;If so, is it possible to rename those variables first or else use OPTIONS VALIDVARNAME=V7 when importing/accessing those source tables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 11:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/271683#M18824</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-05-19T11:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: EG 7.1 Query Builder "Item has already been added.  Key in Dictionary" Error on Modify</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/271709#M18826</link>
      <description>&lt;P&gt;Thank you for the speedy response&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger﻿&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried the Task Template, still errored after creating and calling the template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our data is coming from an RDBMS mapped to a series of different libraries so we have little control over the naming conventions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll elevate it to SAS Tech Support. &amp;nbsp;Thank you for the guidance!&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 13:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/271709#M18826</guid>
      <dc:creator>_WJ</dc:creator>
      <dc:date>2016-05-19T13:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: EG 7.1 Query Builder "Item has already been added.  Key in Dictionary" Error on Modify</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/613652#M35318</link>
      <description>&lt;P&gt;way late to the game on this one, but I came across this post hoping for an answer when I had the same problem.&amp;nbsp; YMMV, but my&amp;nbsp;"Item has already been added. Key in Dictionary" issue stemmed from emailing attachments from multiple process flows. I simply deleted all my shortcuts from my process flow that handled the email function, then rebuilt the "send as a step in the project" adding the other shortcuts.reran the project and voila, no more errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this helps someone, good luck!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 00:37:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-7-1-Query-Builder-quot-Item-has-already-been-added-Key-in/m-p/613652#M35318</guid>
      <dc:creator>karonds</dc:creator>
      <dc:date>2019-12-24T00:37:49Z</dc:date>
    </item>
  </channel>
</rss>

