<?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: using array in dynamic query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529610#M144730</link>
    <description>&lt;P&gt;Here are a few ways.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/237855"&gt;@JohnnySas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I just completed a proc transpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc transpose data=WORK.SIGN1 out=WORK.SIGN2 prefix=E_;&lt;BR /&gt;by CLIENT_XID;&lt;BR /&gt;id SQID;&lt;BR /&gt;var EMAIL;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The E_&amp;nbsp; = E1, E2, E3, E4, E.....(nth)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: How do I use an array in the next data step to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. dynamically select all the E1,E2, E3, E....(nth) from&amp;nbsp;WORK.SIGN2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 04:18:41 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-01-24T04:18:41Z</dc:date>
    <item>
      <title>using array in dynamic query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529607#M144728</link>
      <description>&lt;P&gt;I just completed a proc transpose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc transpose data=WORK.SIGN1 out=WORK.SIGN2 prefix=E_;&lt;BR /&gt;by CLIENT_XID;&lt;BR /&gt;id SQID;&lt;BR /&gt;var EMAIL;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The E_&amp;nbsp; = E1, E2, E3, E4, E.....(nth)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: How do I use an array in the next data step to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. dynamically select all the E1,E2, E3, E....(nth) from&amp;nbsp;WORK.SIGN2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 03:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529607#M144728</guid>
      <dc:creator>JohnnySas</dc:creator>
      <dc:date>2019-01-24T03:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: using array in dynamic query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529609#M144729</link>
      <description>&lt;P&gt;What do you want to do?&lt;/P&gt;
&lt;P&gt;Like this?&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;sum( of E_: )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 03:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529609#M144729</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-01-24T03:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: using array in dynamic query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529610#M144730</link>
      <description>&lt;P&gt;Here are a few ways.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/237855"&gt;@JohnnySas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I just completed a proc transpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc transpose data=WORK.SIGN1 out=WORK.SIGN2 prefix=E_;&lt;BR /&gt;by CLIENT_XID;&lt;BR /&gt;id SQID;&lt;BR /&gt;var EMAIL;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The E_&amp;nbsp; = E1, E2, E3, E4, E.....(nth)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: How do I use an array in the next data step to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. dynamically select all the E1,E2, E3, E....(nth) from&amp;nbsp;WORK.SIGN2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 04:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529610#M144730</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-24T04:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: using array in dynamic query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529679#M144762</link>
      <description>&lt;P&gt;The next step can identify all variable names that begin with E_ into an array in this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set sign2;&lt;/P&gt;
&lt;P&gt;array emails {*} E_: ;&lt;/P&gt;
&lt;P&gt;*** add logic here if desired ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 14:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529679#M144762</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-01-24T14:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: using array in dynamic query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529706#M144773</link>
      <description>&lt;P&gt;Thank You for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All i want is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do a dynamic creation of a select from the result of the proc transpose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;E_1, E_2,E_3, E,....(nth)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from ....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 15:06:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529706#M144773</guid>
      <dc:creator>JohnnySas</dc:creator>
      <dc:date>2019-01-24T15:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: using array in dynamic query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529726#M144782</link>
      <description>SQL does not support variable lists. A data step does, so using a data step is a better option.</description>
      <pubDate>Thu, 24 Jan 2019 16:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529726#M144782</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-24T16:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: using array in dynamic query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529841#M144830</link>
      <description>&lt;P&gt;&lt;STRONG&gt;select &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;t1.*&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;from TABLE ( keep= E_: .... )&amp;nbsp; t1&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;.... &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 20:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-array-in-dynamic-query/m-p/529841#M144830</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-01-24T20:26:28Z</dc:date>
    </item>
  </channel>
</rss>

