<?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 sql query in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277071#M58718</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;i am supposed to&amp;nbsp; run a query such as&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table temp as select var1,var2&lt;/P&gt;
&lt;P&gt;from have where var1&amp;gt;0&lt;/P&gt;
&lt;P&gt;group by var2;quit;&lt;/P&gt;
&lt;P&gt;and copy the results and paste into an excel sheet but when running my program file.sas which has this query i only get the log saying you created a&amp;nbsp; table of 100 records and 2 variables&amp;nbsp; but i dont get a file.lst file which would display the data so i can copy it and paste it.&lt;/P&gt;
&lt;P&gt;it can not be a&amp;nbsp; dataset. has to be data i copy from the listing.&amp;nbsp; how do&amp;nbsp; i achieve this? anyone pls?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2016 00:09:23 GMT</pubDate>
    <dc:creator>Tal</dc:creator>
    <dc:date>2016-06-14T00:09:23Z</dc:date>
    <item>
      <title>sql query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277071#M58718</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;i am supposed to&amp;nbsp; run a query such as&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table temp as select var1,var2&lt;/P&gt;
&lt;P&gt;from have where var1&amp;gt;0&lt;/P&gt;
&lt;P&gt;group by var2;quit;&lt;/P&gt;
&lt;P&gt;and copy the results and paste into an excel sheet but when running my program file.sas which has this query i only get the log saying you created a&amp;nbsp; table of 100 records and 2 variables&amp;nbsp; but i dont get a file.lst file which would display the data so i can copy it and paste it.&lt;/P&gt;
&lt;P&gt;it can not be a&amp;nbsp; dataset. has to be data i copy from the listing.&amp;nbsp; how do&amp;nbsp; i achieve this? anyone pls?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 00:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277071#M58718</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2016-06-14T00:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277074#M58719</link>
      <description>&lt;P&gt;"create able temp" creates a SAS data set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can get a several ways:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Drop the "create table temp" and PROC SQL will just list the data.&lt;/LI&gt;&lt;LI&gt;Run proc print on "temp" to create the listing.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have SAS ACCESS licensed, you could directly export "temp" to Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 00:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277074#M58719</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2016-06-14T00:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277080#M58722</link>
      <description>&lt;P&gt;Or use proc export to avoid the manual copy/paste operation.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 01:15:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277080#M58722</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-06-14T01:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277091#M58723</link>
      <description>&lt;P&gt;Copy and pasting is a bad idea, it's too easy to make mistakes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can't export to excel due to some license restriction - ie no SAS/Access look into the following macro.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export" target="_blank"&gt;http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or export to a CSV, and then save as an Excel file, since you're doing a manual step anyways.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 02:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277091#M58723</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-14T02:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277538#M58764</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 12:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277538#M58764</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2016-06-15T12:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277541#M58766</link>
      <description>&lt;P&gt;Thanks Reeza,&lt;/P&gt;
&lt;P&gt;I did export&amp;nbsp; it into an excel file&amp;nbsp; but they did not want it that way. They have always been copying and pasting the listing. Dont know why.&lt;/P&gt;
&lt;P&gt;the max ls(linesize) is 256 right?&lt;/P&gt;
&lt;P&gt;I was&amp;nbsp; trying to shrink the&amp;nbsp; output a&amp;nbsp; bit but i guess in SAS thats&amp;nbsp; the maximum&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 12:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sql-query/m-p/277541#M58766</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2016-06-15T12:49:50Z</dc:date>
    </item>
  </channel>
</rss>

