<?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: Keep only numeric returns from CRSP using SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710583#M218765</link>
    <description>&lt;P&gt;Dear ballardw,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks for your help. Unfortunately this does not work&lt;/P&gt;
&lt;P&gt;Please see attached&lt;/P&gt;
&lt;P&gt;I have tried with single quotes too!&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logfile.jpg" style="width: 705px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53383i7C7770028B955844/image-size/large?v=v2&amp;amp;px=999" role="button" title="logfile.jpg" alt="logfile.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2021 15:36:11 GMT</pubDate>
    <dc:creator>georgel</dc:creator>
    <dc:date>2021-01-11T15:36:11Z</dc:date>
    <item>
      <title>Keep only numeric returns from CRSP using SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710556#M218751</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to add a condition in my sql to drop returns appear in CRSP as 'C':&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
       create table dsf as
       select a.* , b.date,  b.RET as RET
       from work.Benchmarks2 as a
	   left join temp  as b
	   on a.cusip=b.cusip and a.Conditional_Exercise_Date&amp;lt;b.date and b.date&amp;lt;=b.date+756-count_temp;
quit;&lt;BR /&gt;&lt;BR /&gt;/*The resulting table is:*/&lt;BR /&gt;Also it is stated that returns in CRSP are numeric in format but in the first row appears the letter 'C' &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.jpg" style="width: 392px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53382i9C17C3E086E8596C/image-size/large?v=v2&amp;amp;px=999" role="button" title="example.jpg" alt="example.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Many thanks in advance&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;George&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 14:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710556#M218751</guid>
      <dc:creator>georgel</dc:creator>
      <dc:date>2021-01-11T14:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only numeric returns from CRSP using SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710562#M218754</link>
      <description>&lt;P&gt;I am &lt;STRONG&gt;guessing &lt;/STRONG&gt;that the variable RET holds your "returns" since you do not state so.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;PROC SQL;
       create table dsf as
       select a.* , b.date,  b.RET as RET
       from work.Benchmarks2 as a
	   left join ( select * from temp
                       where not ret=:'C' )  as b
	   on a.cusip=b.cusip and 
             a.Conditional_Exercise_Date&amp;lt;b.date and 
             b.date&amp;lt;=b.date+756-count_temp;
quit;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Jan 2021 14:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710562#M218754</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-11T14:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only numeric returns from CRSP using SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710583#M218765</link>
      <description>&lt;P&gt;Dear ballardw,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks for your help. Unfortunately this does not work&lt;/P&gt;
&lt;P&gt;Please see attached&lt;/P&gt;
&lt;P&gt;I have tried with single quotes too!&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logfile.jpg" style="width: 705px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53383i7C7770028B955844/image-size/large?v=v2&amp;amp;px=999" role="button" title="logfile.jpg" alt="logfile.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 15:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710583#M218765</guid>
      <dc:creator>georgel</dc:creator>
      <dc:date>2021-01-11T15:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only numeric returns from CRSP using SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710611#M218780</link>
      <description>&lt;P&gt;SAS has enough extension I hoped the "begins with" equality, the =: would work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where not substr(ret,1,1) = 'C' &lt;/P&gt;
&lt;P&gt;should work instead of the =:&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 16:27:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710611#M218780</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-11T16:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only numeric returns from CRSP using SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710612#M218781</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;SAS has enough extension I hoped the "begins with" equality, the =: would work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where not substr(ret,1,1) = 'C'&lt;/P&gt;
&lt;P&gt;should work instead of the =:&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In SQL you can use the EQT operator.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 16:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710612#M218781</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-11T16:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only numeric returns from CRSP using SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710646#M218808</link>
      <description>&lt;P&gt;&amp;nbsp;Here it is the solution with a little modification!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
PROC SQL;
       create table dsf as
       select a.* , b.date,  b.RET as RET
       from work.Benchmarks2 as a
	   left join ( select * from temp
                       where ret+0^=. )  as b
	   on a.cusip=b.cusip and a.Conditional_Exercise_Date&amp;lt;b.date and b.date&amp;lt;=b.date+756-count_temp;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 17:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-numeric-returns-from-CRSP-using-SQL/m-p/710646#M218808</guid>
      <dc:creator>georgel</dc:creator>
      <dc:date>2021-01-11T17:57:27Z</dc:date>
    </item>
  </channel>
</rss>

