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