<?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: Table selector prompt in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721588#M80219</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is a qwery, text in red I would like it to be variable by year in the FROM. if the person enters 2020 take the table TABLE2020, if the person enters 2019 that take the table TABLE2019&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.QUERY_TABLETEST AS&lt;BR /&gt;SELECT t1.Ano,&lt;BR /&gt;(INPUT(t1.IdComuna,BEST32.)) AS ID_COMUNA&lt;BR /&gt;(SUM(t1.Col01 - t1.Col04 - t1.Col05 )) AS TOTAL&lt;BR /&gt;FROM &lt;FONT color="#993300"&gt;&lt;U&gt;&lt;STRONG&gt;TABLE2020&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&amp;nbsp; t1&lt;BR /&gt;GROUP BY&lt;BR /&gt;t1.Ano,&lt;BR /&gt;t1.IdComuna;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maybe I could explain myself better&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2021 15:07:33 GMT</pubDate>
    <dc:creator>Andres_Fuentes</dc:creator>
    <dc:date>2021-02-24T15:07:33Z</dc:date>
    <item>
      <title>Table selector prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721404#M80217</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, good afternoon, I would like to ask for a little help with something. In the Guide server we have several tables listed by years, I have a process which analyzes the tables but what I want to achieve is that the user selects the year with a prompt and executes the analysis qwerys.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These are examples with the names of the tables that I have.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;table2018&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;table2019&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;table2020&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ejemplo.PNG" style="width: 112px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55091i6DB38B184103F528/image-size/large?v=v2&amp;amp;px=999" role="button" title="ejemplo.PNG" alt="ejemplo.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks for your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 21:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721404#M80217</guid>
      <dc:creator>Andres_Fuentes</dc:creator>
      <dc:date>2021-02-23T21:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Table selector prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721417#M80218</link>
      <description>Create a custom prompt for year (ie selectedYear) and then use table&amp;amp;selectedYear in your code when you want to reference that table. &lt;BR /&gt;&lt;BR /&gt;I'm assuming that's your question, since there isn't really a clear question in your post.</description>
      <pubDate>Tue, 23 Feb 2021 21:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721417#M80218</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-23T21:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Table selector prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721588#M80219</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is a qwery, text in red I would like it to be variable by year in the FROM. if the person enters 2020 take the table TABLE2020, if the person enters 2019 that take the table TABLE2019&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.QUERY_TABLETEST AS&lt;BR /&gt;SELECT t1.Ano,&lt;BR /&gt;(INPUT(t1.IdComuna,BEST32.)) AS ID_COMUNA&lt;BR /&gt;(SUM(t1.Col01 - t1.Col04 - t1.Col05 )) AS TOTAL&lt;BR /&gt;FROM &lt;FONT color="#993300"&gt;&lt;U&gt;&lt;STRONG&gt;TABLE2020&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&amp;nbsp; t1&lt;BR /&gt;GROUP BY&lt;BR /&gt;t1.Ano,&lt;BR /&gt;t1.IdComuna;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maybe I could explain myself better&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 15:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721588#M80219</guid>
      <dc:creator>Andres_Fuentes</dc:creator>
      <dc:date>2021-02-24T15:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table selector prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721592#M80220</link>
      <description>Create a custom prompt for year (ie selectedYear) and then use table&amp;amp;selectedYear in your code when you want to reference that table.&lt;BR /&gt;&lt;BR /&gt;So your code would become:&lt;BR /&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.QUERY_TABLETEST AS&lt;BR /&gt;SELECT t1.Ano,&lt;BR /&gt;(INPUT(t1.IdComuna,BEST32.)) AS ID_COMUNA&lt;BR /&gt;(SUM(t1.Col01 - t1.Col04 - t1.Col05 )) AS TOTAL&lt;BR /&gt;FROM TABLE&amp;amp;selectedYear  t1&lt;BR /&gt;GROUP BY&lt;BR /&gt;t1.Ano,&lt;BR /&gt;t1.IdComuna;&lt;BR /&gt;QUIT;&lt;BR /&gt;&lt;BR /&gt;Are you familiar with Prompts in EG? &lt;BR /&gt;</description>
      <pubDate>Wed, 24 Feb 2021 15:22:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Table-selector-prompt/m-p/721592#M80220</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-24T15:22:21Z</dc:date>
    </item>
  </channel>
</rss>

