<?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: Question about data and creating a table in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359457#M23656</link>
    <description>&lt;P&gt;Are the Qn variables numeric types? If so, your WHERE clause is unnecessarily complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can quickly &lt;A href="http://blogs.sas.com/content/sasdummy/2015/05/14/sas-enterprise-guide-where-clause/" target="_self"&gt;test some of your conditions in the &lt;STRONG&gt;Where&lt;/STRONG&gt; field in the data viewer&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 18:59:45 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2017-05-17T18:59:45Z</dc:date>
    <item>
      <title>Question about data and creating a table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359453#M23654</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran this query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc sql ;&lt;BR /&gt;&amp;nbsp;Create table sasdata.hlth_lc as&lt;BR /&gt;&amp;nbsp;Select&lt;BR /&gt;&amp;nbsp; c.Patient_ID&lt;BR /&gt;&amp;nbsp;,c.State&lt;BR /&gt;&amp;nbsp;,c.Zip_code&lt;BR /&gt;&amp;nbsp;,c.Gender&lt;BR /&gt;&amp;nbsp;,c.survey_date&lt;BR /&gt;&amp;nbsp;,c.score&lt;BR /&gt;&amp;nbsp;,c.Q1&lt;BR /&gt;&amp;nbsp;,c.Q2&lt;BR /&gt;&amp;nbsp;,c.Q3&lt;BR /&gt;&amp;nbsp;,c.Q4&lt;BR /&gt;&amp;nbsp;,c.Q5&lt;BR /&gt;&amp;nbsp;,c.Q6&lt;BR /&gt;&amp;nbsp;,c.Q7&lt;BR /&gt;&amp;nbsp;,c.Q10&lt;BR /&gt;&amp;nbsp;,c.Q19&lt;BR /&gt;&amp;nbsp;,c.Q23&lt;BR /&gt;&amp;nbsp;From Health.last_contact_yr2016 as c&lt;BR /&gt;&amp;nbsp;where put(c.Q3,2.) in ('3','4','5')&lt;BR /&gt;&amp;nbsp;and&amp;nbsp; put(c.Q4,2.) ='3'&lt;BR /&gt;&amp;nbsp;and put(c.Q19,2.)='3'&lt;BR /&gt;&amp;nbsp;and put(c.Q10,2.)='1'&lt;BR /&gt;&amp;nbsp;and put(c.Q23,2.) in ('3','4','5')&lt;BR /&gt;&amp;nbsp;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My libnames are correctly defined, and everything, but for some reason it says generated 0 rows and 16 columns, my data is correct and is there but for some reason my table with my specific variables are not being created/its not reading the data?&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 18:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359453#M23654</guid>
      <dc:creator>Rsadiq1</dc:creator>
      <dc:date>2017-05-17T18:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Question about data and creating a table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359455#M23655</link>
      <description>&lt;P&gt;Remove your WHERE clause and add the conditions back one at a time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can figure out why you're not getting any records.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, this assumes your code was correct. Include your LOG to show that the code does not have errors as written.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 18:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359455#M23655</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-17T18:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Question about data and creating a table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359457#M23656</link>
      <description>&lt;P&gt;Are the Qn variables numeric types? If so, your WHERE clause is unnecessarily complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can quickly &lt;A href="http://blogs.sas.com/content/sasdummy/2015/05/14/sas-enterprise-guide-where-clause/" target="_self"&gt;test some of your conditions in the &lt;STRONG&gt;Where&lt;/STRONG&gt; field in the data viewer&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 18:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359457#M23656</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-05-17T18:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Question about data and creating a table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359459#M23657</link>
      <description>&lt;P&gt;The problem does indeed lie in the WHERE clause:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;where put(c.Q3,2.) in ('3','4','5')&lt;BR /&gt;&amp;nbsp;and&amp;nbsp; put(c.Q4,2.) ='3'&lt;BR /&gt;&amp;nbsp;and put(c.Q19,2.)='3'&lt;BR /&gt;&amp;nbsp;and put(c.Q10,2.)='1'&lt;BR /&gt;&amp;nbsp;and put(c.Q23,2.) in ('3','4','5')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By using the 2. format, you will never find a match.&amp;nbsp; The 2. format gives you a leading blank followed by a digit, which will never match values that have no leading blanks.&amp;nbsp; Why not get rid of the PUT function entirely?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;where c.Q3 in (3, 4, 5)&lt;BR /&gt;&amp;nbsp;and&amp;nbsp; c.Q4=3&lt;BR /&gt;&amp;nbsp;and c.Q19=3&lt;BR /&gt;&amp;nbsp;and c.Q10=1&lt;BR /&gt;&amp;nbsp;and c.Q23 in (3, 4, 5)&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 19:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359459#M23657</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-17T19:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Question about data and creating a table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359463#M23658</link>
      <description>&lt;P&gt;I tried without the put function but it said the data types were not the same so I added the put function for that reason, which fixed the error.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 19:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359463#M23658</guid>
      <dc:creator>Rsadiq1</dc:creator>
      <dc:date>2017-05-17T19:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question about data and creating a table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359466#M23659</link>
      <description>&lt;P&gt;You created the error in the first place, by adding quotes around the numeric values.&amp;nbsp; That's what forced&amp;nbsp;you into using the PUT function.&amp;nbsp; Just get rid of the quotes and the PUT function at the same time.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 19:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359466#M23659</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-17T19:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Question about data and creating a table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359470#M23660</link>
      <description>&lt;P&gt;got it thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 19:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-data-and-creating-a-table/m-p/359470#M23660</guid>
      <dc:creator>Rsadiq1</dc:creator>
      <dc:date>2017-05-17T19:34:56Z</dc:date>
    </item>
  </channel>
</rss>

