<?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: Why Proc SQL left join output duplicates values? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442130#M20579</link>
    <description>&lt;P&gt;A CrossTab is the tabulation of the cross between TWO variables.&lt;/P&gt;
&lt;P&gt;You can't have a crosstab with only one variable, it doesn't make any sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to see that ODS outputs are being generated by a particular piece of code you can use the ODS TRACE command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you just want to get output from PROC FREQ there is no need to resort to ODS outputs. Just use the OUT= option on the TABLES statement.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Mar 2018 03:47:34 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-03-04T03:47:34Z</dc:date>
    <item>
      <title>Why Proc SQL left join output duplicates values?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442061#M20574</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data eq;
input ID y x z w;
cards;
1 1 27 40 8
1 0 . 29 37
1 1 30 . 25
1 1 38 38 23
2 1 23 45 19
2 0 32 20 .
2 1 67 . .
2 1 . 27 .
3 0 33 23 46
3 1 21 12 56
3 0 78 . 34
3 1 13 45 . 
4 1 56 45 23
4 0 67 13 67  
4 0 . 35 13
4 1 48 35 56 
;
run;

proc freq data=eq;
tables id;
where z ne . ;
ods output CrossTabFreqs=CrossTabFreqs;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I am trying to output &lt;SPAN&gt;the CrossTabFreqs. I could get a table but no output dataset is created. and I got the following message.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Output 'CrossTabFreqs' was not created. Make sure that the output object name, label, or&lt;BR /&gt;path is spelled correctly. Also, verify that the appropriate procedure options are used&lt;BR /&gt;to produce the requested output object. For example, verify that the NOPRINT option is&lt;BR /&gt;not used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone could help me solve this problem? Thanks a lot&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 17:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442061#M20574</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-03-03T17:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why Proc SQL left join output duplicates values?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442067#M20575</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is because your proc freq syntax is not creating a cross tab. In order to get a cross tabulation in a data set then you have to generate a cross tab. Please try this to see the output data set&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=eq;&lt;BR /&gt;tables id*y;&lt;BR /&gt;where z ne . ;&lt;BR /&gt;ods output CrossTabFreqs=CrossTabFreqs;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data = CrossTabFreqs;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 17:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442067#M20575</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2018-03-03T17:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why Proc SQL left join output duplicates values?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442069#M20576</link>
      <description>&lt;P&gt;thanks for your reply. I know it works if I use table ID*y . but what if I want to generate&amp;nbsp; a cross tab just for ID?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 17:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442069#M20576</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-03-03T17:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why Proc SQL left join output duplicates values?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442071#M20577</link>
      <description>&lt;P&gt;For a single variable this is not a cross tab. This will be a frequency distribution of the variable id. Try this to get the freq distribution of variable id in a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=eq;&lt;BR /&gt;tables id;&lt;BR /&gt;where z ne . ;&lt;BR /&gt;ods output OneWayFreqs=OneWayFreqs;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 17:58:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442071#M20577</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2018-03-03T17:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why Proc SQL left join output duplicates values?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442074#M20578</link>
      <description>&lt;P&gt;Thank you very much. That is what I want, but I don't know how to describe it. I&amp;nbsp;think the following code is for &lt;SPAN&gt;frequency distribution&lt;/SPAN&gt;. But it&amp;nbsp; is not what I want.&lt;/P&gt;&lt;P&gt;proc freq data=eq;&lt;BR /&gt;tables id/out=e1;&lt;BR /&gt;where z ne . ;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 18:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442074#M20578</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-03-03T18:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why Proc SQL left join output duplicates values?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442130#M20579</link>
      <description>&lt;P&gt;A CrossTab is the tabulation of the cross between TWO variables.&lt;/P&gt;
&lt;P&gt;You can't have a crosstab with only one variable, it doesn't make any sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to see that ODS outputs are being generated by a particular piece of code you can use the ODS TRACE command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you just want to get output from PROC FREQ there is no need to resort to ODS outputs. Just use the OUT= option on the TABLES statement.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Mar 2018 03:47:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442130#M20579</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-03-04T03:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why Proc SQL left join output duplicates values?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442131#M20580</link>
      <description>thanks, "ods output OneWayFreqs=OneWayFreqs;" is what I want</description>
      <pubDate>Sun, 04 Mar 2018 04:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-Proc-SQL-left-join-output-duplicates-values/m-p/442131#M20580</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-03-04T04:14:16Z</dc:date>
    </item>
  </channel>
</rss>

