Search notes:

SAS - proc sql: joins

Full outer join

data num_english;
     length txt $20.;
     num=1; txt='one'  ; output;
     num=2; txt='two'  ; output;
     num=3; txt='three'; output;
     num=5; txt='five' ; output;
run;

data num_german;
     length txt $20.;
     num=1; txt='eins' ; output;
     num=3; txt='drei' ; output;
     num=4; txt='vier' ; output;
     num=5; txt='fünf' ; output;
run;

proc sql;
  select
    coalesce(en.num, gr.num) as num,
    en.txt as txt_en,
    gr.txt as txt_fr
  from
    num_english en full outer join
    num_german  gr on en.num = gr.num
      /* using(num) -> The using clause is not supported */
    ;
quit;
/*
     num  txt_en                txt_fr
----------------------------------------------------
       1  one                   eins
       2  two
       3  three                 drei
       4                        vier
       5  five                  fünf
*/
Github repository about-SAS, path: /programming/proc/sql/select/join/full-outer.sas

See also

select
proc sql
data step merge statement

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Companie...', 1759415520, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/proc/sql/select/join(82): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78