<?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 on a juncture in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310695#M20987</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;, i have seen with a collegue...and i understand your data set, thanks a lot! It's OK&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2016 15:46:58 GMT</pubDate>
    <dc:creator>peter2</dc:creator>
    <dc:date>2016-11-10T15:46:58Z</dc:date>
    <item>
      <title>Problem on a juncture</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310625#M20970</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables that i want to join. They have one column in commun which name is "Thême". In one table i get only one theme "TRANSFERT"' in the second I have 12 Theme.&lt;/P&gt;&lt;P&gt;I try to joint the tables in the aim to get one column "Theme"&amp;nbsp;which contains&amp;nbsp;the 13 items.&lt;/P&gt;&lt;P&gt;You can find the code of the 2 tables&amp;nbsp;&amp;nbsp;"A faire theme Rennes "&amp;nbsp;and "Stock Theme Rennes" and finaly the jointure i make not good...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By advance thank you a lot.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
   CREATE TABLE WORK.QUERY_FOR_STOCKS_THEME_Rennes(label="Query") AS 
   SELECT t4.'Famille d''opération'n AS 'Thême'n, 
          /* COUNT_of_Famille d'opération */
            (COUNT(t4.'Famille d''opération'n)) AS 'COUNT_of_Famille d''opération'n
      FROM WORK.QUERY_FOR_STOCKS_POUR_PF_X t1, WORK.TABLE_LIBELL__CF1 t2, WORK.TABLE_DES_DSCS t3, WORK.TABLE_DES_TH_MES1 
          t4
      WHERE (t1.CFG = t2.CFG AND t2.'Libellé Centre Financier'n = t3.'Libellé Centre Financier'n AND t1.LB_TYP_OPE2 = t4.
           'Type d''opération'n) AND (t1.'Code statut physique'n = 'EE' AND t1.'Libellé famille opération'n NOT = 
           '5_RENSEIGNEMENT RCF' AND t3.DSCS = 'RENNES')
      GROUP BY t4.'Famille d''opération'n;
QUIT;


PROC SQL;
   CREATE TABLE WORK.QUERY_AFAIRE_THEME_RENNES(label="Query") AS 
   SELECT t3.'Famille d''opération'n AS 'Thême'n, 
          /* COUNT_of_Famille d'opération */
            (COUNT(t3.'Famille d''opération'n)) AS 'COUNT_of_Famille d''opération'n
      FROM WORK.QUERY_AFAIRE t1
           INNER JOIN WORK.TABLE_DES_TH_MES1 t3 ON (t1.LB_TYP_OPE2 = t3.'Type d''opération'n)
      WHERE t1.'Zone partition identifiant CRSF'n = 358100 
      GROUP BY t3.'Famille d''opération'n;
QUIT;


PROC SQL;
   CREATE TABLE WORK.QUERY_FOR_QUERY_AFAIRE_THEME_REN(label="QUERY_FOR_QUERY_AFAIRE_THEME_RENNES") AS 
   SELECT t1.'Thême'n, 
          t2.'COUNT_of_Famille d''opération'n AS 'COUNT_of_Famille d''opération1'n, 
          t1.'COUNT_of_Famille d''opération'n
      FROM WORK.QUERY_AFAIRE_THEME_RENNES t1
           FULL JOIN WORK.QUERY_FOR_STOCKS_THEME_RENNES t2 ON (t1.'Thême'n = t2.'Thême'n);
QUIT;




&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 11:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310625#M20970</guid>
      <dc:creator>peter2</dc:creator>
      <dc:date>2016-11-10T11:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on a juncture</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310633#M20971</link>
      <description>&lt;P&gt;First, get rid of those ridiculous names. They cause eye cancer and totally unnecessary typing, and make it next to impossible for non-french users to type for testing purposes.&lt;/P&gt;
&lt;P&gt;Really.&lt;/P&gt;
&lt;P&gt;I mean it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, supply some test data ("have" and "want") to illustrate your intentions. Because of said eye-cancer, it is very hard to read that from the code.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;Example data is best posted in the form of a data step with datalines.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Strong hint: use SAS column labels for descriptive column names.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 13:18:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310633#M20971</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-10T13:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on a juncture</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310652#M20974</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;, sorry. I have saved the zip you talk about. But where is the autoexe?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To come back to the subject, imagine I have 2 tables with one column cars.&lt;/P&gt;&lt;P&gt;The first with BMW, Mercedes, Porsche.... in one column and numbers old sold in the other column&lt;/P&gt;&lt;P&gt;The second with only one&amp;nbsp;value&amp;nbsp; : KIA in one column and the numbers of stock.&lt;/P&gt;&lt;P&gt;Which jointure do i have to do to put the kia with BMW in one colomn, the second colomn with the sold (so 0 for kia) ans a third column with stock (so 0 for BMW, Mercedes...)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 13:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310652#M20974</guid>
      <dc:creator>peter2</dc:creator>
      <dc:date>2016-11-10T13:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on a juncture</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310657#M20975</link>
      <description>&lt;P&gt;Here's an example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars1;
input make $ sold;
cards;
BMW 3
VW 2
Ford 4
;
run;

data cars2;
input make $ stock;
cards;
KIA 6
;
run;

data cars;
set
  cars1
  cars2
;
array _nums _numeric_;
do _i = 1 to dim(_nums);
  if _nums{_i} = . then _nums{_i} = 0;
end;
drop _i;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The action with the array is solely to have a generic way to replace all missing numeric values with 0; if there are missing values present that need to be preserved, one must be more specific. Use the in= dataset option on the input datasets, and set the correct variables to 0 with the right condition (if not in_cars1 then stock = 0; )&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 13:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310657#M20975</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-10T13:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on a juncture</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310671#M20977</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;, thank you for trying to help me but i surely dont have well described what is the problem. When I do the jointure i have well "0" in the column. What I dont have is :&lt;/P&gt;&lt;P&gt;bmw&lt;/P&gt;&lt;P&gt;vw&lt;/P&gt;&lt;P&gt;mercedes&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;KIa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only have&lt;/P&gt;&lt;P&gt;nothing&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; 2&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; 0&lt;/P&gt;&lt;P&gt;nothing&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; 4&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; 0&lt;/P&gt;&lt;P&gt;....&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;6&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; 0&amp;nbsp;&lt;/P&gt;&lt;P&gt;kia&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; 0&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; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the name of other car instead of nothing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 14:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310671#M20977</guid>
      <dc:creator>peter2</dc:creator>
      <dc:date>2016-11-10T14:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on a juncture</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310677#M20979</link>
      <description>&lt;P&gt;So you need to apply your logic to the example data I provided, and then post the code, so I can see where the difference is.&lt;/P&gt;
&lt;P&gt;My code produces a dataset where proc print output is this:&lt;/P&gt;
&lt;PRE&gt;Obs    make    sold    stock

 1     BMW       3       0  
 2     VW        2       0  
 3     Ford      4       0  
 4     KIA       0       6  
&lt;/PRE&gt;
&lt;P&gt;So you can see that the "make" column is appropriately filled.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 14:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310677#M20979</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-10T14:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on a juncture</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310695#M20987</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;, i have seen with a collegue...and i understand your data set, thanks a lot! It's OK&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 15:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-on-a-juncture/m-p/310695#M20987</guid>
      <dc:creator>peter2</dc:creator>
      <dc:date>2016-11-10T15:46:58Z</dc:date>
    </item>
  </channel>
</rss>

