<?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: Error for creating new table in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Error-for-creating-new-table/m-p/314835#M1568</link>
    <description>&lt;P&gt;You need a LIBNAME statement to point to the library where your data exist or should be saved,&lt;/P&gt;
&lt;P&gt;like:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;libname gct "...path to the library ...";&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also: in proc sql, when you use &amp;nbsp;a form of X.y - then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X should be defined as reference to&amp;nbsp;input dataset an&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;y is a variable name.&lt;/P&gt;
&lt;P&gt;Your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;SELECT GCT.DemCluster, &amp;nbsp;GCT.DemGender, &amp;nbsp;GCT.DemReg, GCT.DemTVReg&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;would be interpreted as: GCT is a reference&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while&amp;nbsp;&lt;STRONG&gt;DemGender &amp;nbsp;&amp;nbsp;DemReg &amp;nbsp;&amp;nbsp;DemTVReg&amp;nbsp;&lt;/STRONG&gt;- are variables in your input&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;defined by:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;FROM GCT.ORGANICS; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;that&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;should be changed into:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM GCT.ORGANICS &amp;nbsp;&lt;STRONG&gt; as GCT&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2016 15:22:56 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-11-28T15:22:56Z</dc:date>
    <item>
      <title>Error for creating new table</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-for-creating-new-table/m-p/314658#M1560</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hi, I am trying to create new &amp;nbsp;table as below code, but it shows error like"&lt;SPAN&gt;ERROR: Unresolved reference to table/correlation name GCT.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;can you help ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE GCT.ORGANICS_IMPUTED_ALL&lt;BR /&gt;AS&lt;BR /&gt;SELECT GCT.DemCluster,GCT.DemGender,GCT.DemReg, GCT.DemTVReg&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemCluster = '') THEN 'U'&lt;BR /&gt;ELSE DemCluster&lt;BR /&gt;END) AS IMP_DemCluster&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemGender = '') THEN 'U'&lt;BR /&gt;ELSE DemGender&lt;BR /&gt;END) AS IMP_DemGender&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemReg = '') THEN 'U'&lt;BR /&gt;ELSE DemReg&lt;BR /&gt;END) AS IMP_DemReg&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemTVReg = '') THEN 'U'&lt;BR /&gt;ELSE DemTVReg&lt;BR /&gt;END) AS IMP_DemTVReg&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemCluster = '') THEN 1&lt;BR /&gt;ELSE 0&lt;BR /&gt;END) AS M_DemCluster&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemGender = '') THEN 1&lt;BR /&gt;ELSE 0&lt;BR /&gt;END) AS M_DemGender&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemReg = '') THEN 1&lt;BR /&gt;ELSE 0&lt;BR /&gt;END) AS M_DemReg&lt;BR /&gt;,(CASE&lt;BR /&gt;WHEN (DemTVReg = '') THEN 1&lt;BR /&gt;ELSE 0&lt;BR /&gt;END) AS M_DemTVReg&lt;/P&gt;&lt;P&gt;FROM GCT.ORGANICS;&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 21:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-for-creating-new-table/m-p/314658#M1560</guid>
      <dc:creator>Macy</dc:creator>
      <dc:date>2016-11-27T21:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error for creating new table</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-for-creating-new-table/m-p/314835#M1568</link>
      <description>&lt;P&gt;You need a LIBNAME statement to point to the library where your data exist or should be saved,&lt;/P&gt;
&lt;P&gt;like:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;libname gct "...path to the library ...";&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also: in proc sql, when you use &amp;nbsp;a form of X.y - then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X should be defined as reference to&amp;nbsp;input dataset an&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;y is a variable name.&lt;/P&gt;
&lt;P&gt;Your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;SELECT GCT.DemCluster, &amp;nbsp;GCT.DemGender, &amp;nbsp;GCT.DemReg, GCT.DemTVReg&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;would be interpreted as: GCT is a reference&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while&amp;nbsp;&lt;STRONG&gt;DemGender &amp;nbsp;&amp;nbsp;DemReg &amp;nbsp;&amp;nbsp;DemTVReg&amp;nbsp;&lt;/STRONG&gt;- are variables in your input&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;defined by:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;FROM GCT.ORGANICS; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;that&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;should be changed into:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM GCT.ORGANICS &amp;nbsp;&lt;STRONG&gt; as GCT&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 15:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-for-creating-new-table/m-p/314835#M1568</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-28T15:22:56Z</dc:date>
    </item>
  </channel>
</rss>

