home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / bit / listserv / sasl / 4002 < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.9 KB  |  36 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!CPMAIL-NZ.CIS.COLUMBIA.EDU!PASSRAY
  3. X-Mailer:     Pegasus Mail v2.3 (R3).
  4. Message-ID: <MAILQUEUE-101.920902184532.256@cpmail-nz.cis.columbia.edu>
  5. Newsgroups: bit.listserv.sas-l
  6. Date:         Wed, 2 Sep 1992 18:45:32 EDT
  7. Reply-To:     Ray Pass <PASSRAY@CPMAIL-NZ.CIS.COLUMBIA.EDU>
  8. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  9. From:         Ray Pass <PASSRAY@CPMAIL-NZ.CIS.COLUMBIA.EDU>
  10. Subject:      Finding non-dups via SQL
  11. Lines: 23
  12.  
  13. OK Howard, Kernon, Andy, et al.  Here's an easy one for you.  I can do it in
  14. non-SQL code, and I could figure it out in SQL, but this time I need a quick
  15. answer.  I've got two files;  I preach and always use meaningful names, but
  16. for now lets call them FILE1 and FILE2.  They've both got a variable CASENO
  17. and 4 other vars (ADMITDT DISDATE MRN HOSPITAL).  They've both got about
  18. 50,000 obs, give or take, but there are some obs in FILE1 that aren't in FILE2
  19. and vice versa.  I need two listings, one showing the cases in FILE1 that
  20. aren't in FILE2, and the other, obviously showing those in FILE2 that aren't
  21. in FILE1.  I don't want to see the dups.  The only var that I care about in
  22. matching is CASENO.  In other words I only want to match on the key CASENO.
  23. I can plow through it by creating a few tables in SQL and then a few
  24. subqueries, but is there a neat way with JOINs or UNIONs or some such SQL
  25. esoterica.  I await your collective wisdom.
  26.  
  27. Ray
  28.  
  29.  
  30.  *--------------------------------------------------------------------------*
  31.  | Ray Pass, Ph.D.                                    Voice: (212) 305-7748 |
  32.  | Columbia-Presbyterian Medical Center                 Fax: (212) 305-3302 |
  33.  | 161 Ft. Washington Ave.       AP1310                                     |
  34.  | New York, NY 10032-3784               passray@cpmail-nz.cis.columbia.edu |
  35.  *--------------------------------------------------------------------------*
  36.