<?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: Proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441255#M282602</link>
    <description>&lt;P&gt;*Creates a data set named WANT in the work library;&lt;/P&gt;
&lt;P&gt;proc sql ;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;create table want as&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;select empid, jobcode, salary,&lt;BR /&gt;salary*.06 as bonus&lt;BR /&gt;from sasuser.payrollmaster&lt;BR /&gt;where salary &amp;lt;3200&lt;BR /&gt;order by jobcode;&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;*Prints&amp;nbsp;the output to the current ODS open destinations, ie listing or html;&lt;/P&gt;
&lt;P&gt;*note the lack of a create table statement, which I've used strikethrough.&lt;/P&gt;
&lt;P&gt;proc sql ;&lt;BR /&gt;&lt;STRIKE&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;/*create table want as*/&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/STRIKE&gt;&lt;BR /&gt;select empid, jobcode, salary,&lt;BR /&gt;salary*.06 as bonus&lt;BR /&gt;from sasuser.payrollmaster&lt;BR /&gt;where salary &amp;lt;3200&lt;BR /&gt;order by jobcode;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of these should be what you're looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Mar 2018 16:15:26 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-03-01T16:15:26Z</dc:date>
    <item>
      <title>Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441232#M282597</link>
      <description>&lt;P&gt;I'm new to proc sql. I want to print the results of proc sql table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you help me to do that??&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 15:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441232#M282597</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-01T15:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441236#M282598</link>
      <description>&lt;P&gt;A simple &lt;FONT face="courier new,courier"&gt;select&lt;/FONT&gt; without a &lt;FONT face="courier new,courier"&gt;create table&lt;/FONT&gt; before it will write the result to the currently open ODS destination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Describe your issue in a more specific manner, and don't forget to post the code you already tried (see &lt;A href="https://communities.sas.com/t5/help/faqpage/faq-category-id/posting?nobounce" target="_blank"&gt;https://communities.sas.com/t5/help/faqpage/faq-category-id/posting?nobounce&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 15:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441236#M282598</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-01T15:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441241#M282599</link>
      <description>&lt;P&gt;this is the code that's I'm using. I don't see the results in the result viewer it's only print&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;TABLE border="0" cellspacing="1" cellpadding="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;The SAS System without a table&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;BR /&gt;select empid, jobcode, salary,&lt;BR /&gt;salary*.06 as bonus&lt;BR /&gt;from sasuser.payrollmaster&lt;BR /&gt;where salary &amp;lt;3200&lt;BR /&gt;order by jobcode;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441241#M282599</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-01T16:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441249#M282600</link>
      <description>&lt;P&gt;What do you mean by 'it's only print'?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select * from sashelp.class;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In Enterprise Guide you will see the resulting output in the formats you set in the EG options, in their respective tabs.&lt;/P&gt;
&lt;P&gt;In SAS Studio, you see the contents of sashelp.class in the Results tab.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441249#M282600</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-01T16:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441253#M282601</link>
      <description>I use window and I don't see a table with my code&lt;BR /&gt;proc sql ;&lt;BR /&gt;&lt;BR /&gt;select empid, jobcode, salary,&lt;BR /&gt;salary*.06 as bonus&lt;BR /&gt;from sasuser.payrollmaster&lt;BR /&gt;where salary &amp;lt;3200&lt;BR /&gt;order by jobcode;&lt;BR /&gt;quit;&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441253#M282601</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-01T16:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441255#M282602</link>
      <description>&lt;P&gt;*Creates a data set named WANT in the work library;&lt;/P&gt;
&lt;P&gt;proc sql ;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;create table want as&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;select empid, jobcode, salary,&lt;BR /&gt;salary*.06 as bonus&lt;BR /&gt;from sasuser.payrollmaster&lt;BR /&gt;where salary &amp;lt;3200&lt;BR /&gt;order by jobcode;&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;*Prints&amp;nbsp;the output to the current ODS open destinations, ie listing or html;&lt;/P&gt;
&lt;P&gt;*note the lack of a create table statement, which I've used strikethrough.&lt;/P&gt;
&lt;P&gt;proc sql ;&lt;BR /&gt;&lt;STRIKE&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;/*create table want as*/&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/STRIKE&gt;&lt;BR /&gt;select empid, jobcode, salary,&lt;BR /&gt;salary*.06 as bonus&lt;BR /&gt;from sasuser.payrollmaster&lt;BR /&gt;where salary &amp;lt;3200&lt;BR /&gt;order by jobcode;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of these should be what you're looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441255#M282602</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-01T16:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441264#M282604</link>
      <description>&lt;P&gt;that's the message that I got&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;9306 proc sql ;&lt;BR /&gt;9307 create table want as&lt;BR /&gt;9308 select empid, jobcode, salary,&lt;BR /&gt;9309 salary*.06 as bonus&lt;BR /&gt;9310 from sasuser.payrollmaster&lt;BR /&gt;9311 where salary &amp;lt;3200&lt;BR /&gt;9312 order by jobcode;&lt;BR /&gt;NOTE: Table WORK.WANT created, with 0 rows and 4 columns.&lt;/P&gt;&lt;P&gt;9313 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441264#M282604</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-01T16:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441265#M282605</link>
      <description>&lt;P&gt;If you want to create a new table, you have to tell SQL to do that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select *
from sashelp.class;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Consult the documentation: &lt;A href="http://documentation.sas.com/?docsetId=sqlproc&amp;amp;docsetTarget=titlepage.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=sqlproc&amp;amp;docsetTarget=titlepage.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441265#M282605</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-01T16:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441266#M282606</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134228"&gt;@mona4u&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;that's the message that I got&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;9306 proc sql ;&lt;BR /&gt;9307 create table want as&lt;BR /&gt;9308 select empid, jobcode, salary,&lt;BR /&gt;9309 salary*.06 as bonus&lt;BR /&gt;9310 from sasuser.payrollmaster&lt;BR /&gt;9311 where salary &amp;lt;3200&lt;BR /&gt;9312 order by jobcode;&lt;BR /&gt;NOTE: Table WORK.WANT created, with 0 rows and 4 columns.&lt;/P&gt;
&lt;P&gt;9313 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This simply means that no observations in the sasuser.payrollmaster dataset match your where condition.&lt;/P&gt;
&lt;P&gt;Inspect your dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441266#M282606</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-01T16:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441267#M282607</link>
      <description>&lt;P&gt;it is wired I was able to print your table without creating a table but with mine I can't&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:30:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441267#M282607</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-01T16:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441268#M282608</link>
      <description>&lt;P&gt;there is obs bc I checked it by proc print&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441268#M282608</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-01T16:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441269#M282609</link>
      <description>&lt;P&gt;If you run that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
create table want as
select empid, jobcode, salary,
salary*.06 as bonus
from sasuser.payrollmaster
where salary &amp;lt;3200
order by jobcode;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and no rows are selected, then&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
select empid, jobcode, salary,
salary*.06 as bonus
from sasuser.payrollmaster
where salary &amp;lt;3200
order by jobcode;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;will create no output (you get an empty results tab).&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:34:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441269#M282609</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-01T16:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441270#M282610</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134228"&gt;@mona4u&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;there is obs bc I checked it by proc print&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;NO.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Quote from your previous post:&lt;/P&gt;
&lt;PRE&gt;9312 order by jobcode;
NOTE: Table WORK.WANT created, with 0 rows and 4 columns.

9313 quit;&lt;/PRE&gt;
&lt;P&gt;Zero means zero, period&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:35:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441270#M282610</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-01T16:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441271#M282611</link>
      <description>&lt;P&gt;I want to see all the rows that's match the criteria&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:36:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441271#M282611</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-01T16:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441277#M282612</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134228"&gt;@mona4u&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I want to see all the rows that's match the criteria&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No rows match that criteria so somethings wrong with the criteria or your data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/441277#M282612</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-01T16:45:29Z</dc:date>
    </item>
  </channel>
</rss>

