<?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: Matching variables in 2 datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324068#M71900</link>
    <description>&lt;P&gt;If I do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tradesdataset;
   input Qty Trade_Price  T1 time8.;
   datalines;
50	100	9:15 
51	101	9:15
75	102	9:15
65	102	9:15
59	105	9:16
50	100	9:16
56	102	9:16
45	100	9:17
51	101	9:17
;

data spreaddataset;
	input T1 time8.  BestBuy  BestSell;
	datalines;
9:15	100	101
9:16	101	105
9:17	105	107
;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then just as &lt;SPAN class="UserName lia-user-name lia-user-rank-Valued-Guide"&gt; &lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384" target="_self"&gt;&lt;SPAN class="login-bold"&gt;Shmuel&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt; suggests do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table CombineDataset as
select *
    from tradesdataset a
    inner join spreaddataset b
    on a.t1 = b.t1;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get the warning as well, but I also get the dataset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Qty	Trade_Price	T1	BestBuy	BestSell
50	100	33300	100	101
51	101	33300	100	101
75	102	33300	100	101
65	102	33300	100	101
59	105	33360	101	105
50	100	33360	101	105
56	102	33360	101	105
45	100	33420	105	107
51	101	33420	105	107
&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;which seems to be more like what you want. You might need to play with the time format. &lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2017 21:46:32 GMT</pubDate>
    <dc:creator>HB</dc:creator>
    <dc:date>2017-01-11T21:46:32Z</dc:date>
    <item>
      <title>Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324035#M71879</link>
      <description>&lt;P&gt;Dear Friends,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 Datasets:&lt;/P&gt;
&lt;P&gt;1. &lt;STRONG&gt;TradesDataset&lt;/STRONG&gt; Containing&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Qty&lt;/STRONG&gt; &lt;STRONG&gt;Trade_Price&lt;/STRONG&gt; &amp;nbsp; &lt;STRONG&gt;T1&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;50 &amp;nbsp; 100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:15&amp;nbsp;&lt;/P&gt;
&lt;P&gt;51 &amp;nbsp; 101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:15&lt;/P&gt;
&lt;P&gt;75 &amp;nbsp; 102 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:15&lt;/P&gt;
&lt;P&gt;65 &amp;nbsp; 102 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:15&lt;/P&gt;
&lt;P&gt;59 &amp;nbsp; 105 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:16&lt;/P&gt;
&lt;P&gt;50 &amp;nbsp; 100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:16&lt;/P&gt;
&lt;P&gt;56 &amp;nbsp; &amp;nbsp;102 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:16&lt;/P&gt;
&lt;P&gt;45 &amp;nbsp; &amp;nbsp;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:17&lt;/P&gt;
&lt;P&gt;51 &amp;nbsp; &amp;nbsp;101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:17&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. SpreadDataset&amp;nbsp;&lt;/STRONG&gt;Containing&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;T1 &amp;nbsp; &amp;nbsp;BestBuy &amp;nbsp;BestSell&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;9:15 &amp;nbsp; 100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;101&lt;/P&gt;
&lt;P&gt;9:16 &amp;nbsp; 101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;105&lt;/P&gt;
&lt;P&gt;9:17 &amp;nbsp; &amp;nbsp;105 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;107&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to Combine the two datasets to Arrive at the following &lt;STRONG&gt;CombineDataset:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Qty&lt;/STRONG&gt; &lt;STRONG&gt;Trade_Price&lt;/STRONG&gt; &amp;nbsp; &lt;STRONG&gt;T1&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;BestBuy &amp;nbsp;BestSell&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;50 &amp;nbsp; 100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:15 &amp;nbsp; &amp;nbsp;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;101&lt;/P&gt;
&lt;P&gt;51 &amp;nbsp; 101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:15 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;101&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;75 &amp;nbsp; 102 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:15 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;101&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;65 &amp;nbsp; 102 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:15 &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;101&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;59 &amp;nbsp; 105 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:16 &amp;nbsp; &amp;nbsp; &amp;nbsp;101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 105&lt;/P&gt;
&lt;P&gt;50 &amp;nbsp; 100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:16 &amp;nbsp; &amp;nbsp; &amp;nbsp;101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 105&lt;/P&gt;
&lt;P&gt;56 &amp;nbsp; &amp;nbsp;102 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:16 &amp;nbsp; &amp;nbsp; &amp;nbsp;101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 105&lt;/P&gt;
&lt;P&gt;45 &amp;nbsp; &amp;nbsp;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:17 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;105 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;107&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;51 &amp;nbsp; &amp;nbsp;101 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9:17 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;105 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;107&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How to go about it?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried Merge And Set Options but not getting the desired results.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for helping and sparing your valuable time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Warm Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ritesh&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 19:38:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324035#M71879</guid>
      <dc:creator>rkdubey84</dc:creator>
      <dc:date>2017-01-11T19:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324043#M71885</link>
      <description>&lt;P&gt;Without testing it, it seems to me that you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=&lt;STRONG&gt;TradesDataset;&amp;nbsp;&lt;/STRONG&gt; by t1 trade_price; run;&lt;/P&gt;
&lt;P&gt;proc sort data=&lt;STRONG&gt;SpreadDataset;&lt;/STRONG&gt; by t1 best_but; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; create table&amp;nbsp;&lt;STRONG&gt;CombineDataset as select *&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;from&amp;nbsp;&lt;STRONG&gt;TradesDataset&amp;nbsp;&lt;/STRONG&gt; as a&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; full join&amp;nbsp;&lt;STRONG&gt;SpreadDataset&amp;nbsp;&lt;/STRONG&gt; as b&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; on a.t1 = b.t1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 20:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324043#M71885</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-11T20:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324045#M71886</link>
      <description>This Creates Missing values And results in something like this:&lt;BR /&gt;Qty Trade_Price   T1   BestBuy  BestSell&lt;BR /&gt;50   100               9:15    .                    .&lt;BR /&gt;51   101              9:15     .                   .&lt;BR /&gt;75   102              9:15     .                   .&lt;BR /&gt;65   102              9:15     .                   .&lt;BR /&gt;.           .             9:15      100          101&lt;BR /&gt;59   105             9:16      .                .&lt;BR /&gt;50   100             9:16      .                  .&lt;BR /&gt;56    102            9:16      .                    .&lt;BR /&gt;.            .           9:16      101         105&lt;BR /&gt;45    100             9:17     .             .&lt;BR /&gt;51    101            9:17       .            .&lt;BR /&gt;.          .               9:17  105        107&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jan 2017 20:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324045#M71886</guid>
      <dc:creator>rkdubey84</dc:creator>
      <dc:date>2017-01-11T20:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324051#M71890</link>
      <description>&lt;P&gt;Sorry, I have limitted experience with sql;&lt;/P&gt;
&lt;P&gt;Please try:&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; create table&amp;nbsp;&lt;STRONG&gt;CombineDataset as select *&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;from&amp;nbsp;&lt;STRONG&gt;TradesDataset&amp;nbsp;&lt;/STRONG&gt; as a&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; /* full */&lt;/STRONG&gt;&lt;/FONT&gt; join&amp;nbsp;&lt;STRONG&gt;SpreadDataset&amp;nbsp;&lt;/STRONG&gt; as b&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; on a.t1 = b.t1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help try:&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; create table&amp;nbsp;&lt;STRONG&gt;CombineDataset as select *&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;from&amp;nbsp;&lt;STRONG&gt;TradesDataset&amp;nbsp;&lt;/STRONG&gt; as a&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;inner&lt;/STRONG&gt; join&amp;nbsp;&lt;STRONG&gt;SpreadDataset&amp;nbsp;&lt;/STRONG&gt; as b&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; on a.t1 = b.t1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 20:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324051#M71890</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-11T20:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324057#M71893</link>
      <description>Really Appreciate your efforts.... &lt;BR /&gt;&lt;BR /&gt;Both Join &amp;amp; Inner Join Result in:&lt;BR /&gt;&lt;BR /&gt;WARNING: Variable T1 already exists on file WORK.COMBINEDATASET.&lt;BR /&gt;NOTE: Table WORK.COMBINEDATASET created, with 0 rows and 17 columns.&lt;BR /&gt;&lt;BR /&gt;My experience with SQL is limited as well &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;BR /&gt;&lt;BR /&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt; .</description>
      <pubDate>Wed, 11 Jan 2017 21:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324057#M71893</guid>
      <dc:creator>rkdubey84</dc:creator>
      <dc:date>2017-01-11T21:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324066#M71898</link>
      <description>&lt;P&gt;My first answer was righ except a typo:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=&lt;STRONG&gt;TradesDataset;&amp;nbsp;&lt;/STRONG&gt; by t1 trade_price; run;&lt;/P&gt;
&lt;P&gt;proc sort data=&lt;STRONG&gt;SpreadDataset;&lt;/STRONG&gt; by t1 &lt;U&gt;&lt;STRONG&gt;bestbuy&lt;/STRONG&gt;&lt;/U&gt;; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; create table&amp;nbsp;&lt;STRONG&gt;CombineDataset as select *&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;from&amp;nbsp;&lt;STRONG&gt;TradesDataset&amp;nbsp;&lt;/STRONG&gt; as a&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; full join&amp;nbsp;&lt;STRONG&gt;SpreadDataset&amp;nbsp;&lt;/STRONG&gt; as b&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; on a.t1 = b.t1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tested it and it gives the right wanted results.&lt;/P&gt;
&lt;P&gt;Have you checked your log for syntax errors ?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 21:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324066#M71898</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-11T21:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324068#M71900</link>
      <description>&lt;P&gt;If I do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tradesdataset;
   input Qty Trade_Price  T1 time8.;
   datalines;
50	100	9:15 
51	101	9:15
75	102	9:15
65	102	9:15
59	105	9:16
50	100	9:16
56	102	9:16
45	100	9:17
51	101	9:17
;

data spreaddataset;
	input T1 time8.  BestBuy  BestSell;
	datalines;
9:15	100	101
9:16	101	105
9:17	105	107
;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then just as &lt;SPAN class="UserName lia-user-name lia-user-rank-Valued-Guide"&gt; &lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384" target="_self"&gt;&lt;SPAN class="login-bold"&gt;Shmuel&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt; suggests do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table CombineDataset as
select *
    from tradesdataset a
    inner join spreaddataset b
    on a.t1 = b.t1;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get the warning as well, but I also get the dataset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Qty	Trade_Price	T1	BestBuy	BestSell
50	100	33300	100	101
51	101	33300	100	101
75	102	33300	100	101
65	102	33300	100	101
59	105	33360	101	105
50	100	33360	101	105
56	102	33360	101	105
45	100	33420	105	107
51	101	33420	105	107
&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;which seems to be more like what you want. You might need to play with the time format. &lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 21:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324068#M71900</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2017-01-11T21:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Matching variables in 2 datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324070#M71902</link>
      <description>&lt;P&gt;As far as I know, the PROC SORT isn't needed for PROC SQL.&amp;nbsp; Otherwise I agree with this as I posted below.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 21:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-variables-in-2-datasets/m-p/324070#M71902</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2017-01-11T21:48:39Z</dc:date>
    </item>
  </channel>
</rss>

