<?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: Problem with merging datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162286#M31501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If "Ticker" is not unique in your new data set, then data step Merge may not be your best option. In general, one will opt for Proc SQL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt; create table want as&lt;/P&gt;&lt;P&gt; select a.*, b.gvkey from old a /*the created table*/&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;new b /*the new comer*/&lt;/P&gt;&lt;P&gt;on a.ticker=b.ticker&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Dec 2014 20:20:32 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2014-12-25T20:20:32Z</dc:date>
    <item>
      <title>Problem with merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162281#M31496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;Hey, &lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;I am new to the SAS programming language (And programming generally) &lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;I am doing my master thesis, and in that regard, i am going to use SAS a alot. &lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;&lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;I have three datasets with 3 variables in each - (Ticker Year x/y/z).&lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;The datasets are off different sizes.&lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;I want to make one dataset (Ticker Year x y z) and only keep the rows that contains values in x y and z for the same ticker and year.&lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;I tried the following, but it does not give me the right result, several observations that satisfy my criterias are left out:&lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;data data.want;&lt;BR /&gt;merge &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.ibes_april_zeroscore_clean_null (in = b)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.ibes_april_zeroscore_clean_one (in = m)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.ibes_april_zeroscore_clean_two (in = t); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if b &amp;amp; m &amp;amp; t;&lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;run;&lt;/P&gt;&lt;P style="font-family: Verdana, Geneva, Tahoma, 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: #38394b; margin: 4px 0 8px; background: #fbfbfd;"&gt;Best regards &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2014 16:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162281#M31496</guid>
      <dc:creator>hamudi</dc:creator>
      <dc:date>2014-12-25T16:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162282#M31497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;More information is needed before anything can be done.&lt;/P&gt;&lt;P&gt;1. Are all of your data sets presorted by Ticker, Year?&lt;/P&gt;&lt;P&gt;2. Is Ticker, Year unique (no duplicates) in each data set?&lt;/P&gt;&lt;P&gt;3. Explain "...contains value". Is the key missing (no corresponding Ticker, Year), or missing value (x/y/z take missing values, blank if Char, .(Dot) if number)?&lt;/P&gt;&lt;P&gt;4. It would be ideal if you can provide some sample input and expected outcome.&lt;/P&gt;&lt;P&gt;5. As far as your code goes, it missed "by" statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Holidays!&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;H1 class="yt" id="watch-headline-title" style="margin: 0 0 10px; color: #222222; font-weight: normal; font-family: arial, sans-serif; background: #ffffff;"&gt;&lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2014 16:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162282#M31497</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-12-25T16:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162283#M31498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Haikuo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick answer. &lt;/P&gt;&lt;P&gt;I will try and answer your questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The first dataset is presorted by Ticker&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The second and thirt dataset is presorted by date(year) &lt;/P&gt;&lt;P&gt;2) Each Ticker-Year observation is unique in each dataset, so no dublicates. &lt;/P&gt;&lt;P&gt;3) I only want the observations, that have an value in x y and z, after i have merged the dataset.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Ticker Year&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ticker Year Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ticker Year Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT ==&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ticker&amp;nbsp;&amp;nbsp; Year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&amp;nbsp;&amp;nbsp; Y&amp;nbsp;&amp;nbsp;&amp;nbsp; Z &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1990&amp;nbsp;&amp;nbsp;&amp;nbsp; X1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AA&amp;nbsp;&amp;nbsp;&amp;nbsp; 1990 Y1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1990 Z1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1990&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X1 Y1&amp;nbsp; Z1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1991&amp;nbsp;&amp;nbsp;&amp;nbsp; X2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AA&amp;nbsp;&amp;nbsp;&amp;nbsp; 1991 Y2 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1992&amp;nbsp;&amp;nbsp;&amp;nbsp; X3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple example, i have a lot of observations for each ticker in different years, but the Ticker-YEAR combinations are not the same in each dataset. &lt;/P&gt;&lt;P&gt;5) Don't understand, should i add by statement instead of if? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Holidays! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2014 17:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162283#M31498</guid>
      <dc:creator>hamudi</dc:creator>
      <dc:date>2014-12-25T17:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162284#M31499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;/*All of the data sets need to be presorted by the same variables*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=data.ibes_april_zeroscore_clean_null;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Ticker Year;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=data.ibes_april_zeroscore_clean_one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Ticker Year;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=data.ibes_april_zeroscore_clean_two;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Ticker Year;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; data.want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;merge&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.ibes_april_zeroscore_clean_null (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; = b)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.ibes_april_zeroscore_clean_one (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; = m)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.ibes_april_zeroscore_clean_two (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; = t);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; TICKER YEAR; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;/*this is what you have missed*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; b &amp;amp; m &amp;amp; t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2014 17:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162284#M31499</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-12-25T17:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162285#M31500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Haikuo! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to add one final touch to the dataset, then i am good to go! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now have the dataset that we(you) created.&lt;/P&gt;&lt;P&gt;I have another dataset with two variables, ticker and gvkey, it contains approximately 17,000 distinct tickers with a corresponding distinct gvkey. &lt;/P&gt;&lt;P&gt;If i want to add one variable to my new made dataset with gvkey that match the ticker, how do i do that? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2014 19:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162285#M31500</guid>
      <dc:creator>hamudi</dc:creator>
      <dc:date>2014-12-25T19:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162286#M31501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If "Ticker" is not unique in your new data set, then data step Merge may not be your best option. In general, one will opt for Proc SQL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt; create table want as&lt;/P&gt;&lt;P&gt; select a.*, b.gvkey from old a /*the created table*/&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;new b /*the new comer*/&lt;/P&gt;&lt;P&gt;on a.ticker=b.ticker&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2014 20:20:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162286#M31501</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-12-25T20:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162287#M31502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Haikuo, you saved my night &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy holidays (for now). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2014 21:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-merging-datasets/m-p/162287#M31502</guid>
      <dc:creator>hamudi</dc:creator>
      <dc:date>2014-12-25T21:10:03Z</dc:date>
    </item>
  </channel>
</rss>

