home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!MCIMAIL.COM!0001007026
- Message-ID: <05920903030750/0001007026ND1EM@mcimail.com>
- Newsgroups: bit.listserv.sas-l
- Date: Thu, 3 Sep 1992 03:07:00 GMT
- Reply-To: Joseph A Schunk <0001007026@MCIMAIL.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Joseph A Schunk <0001007026@MCIMAIL.COM>
- Subject: re: sql questions
- Lines: 40
-
- >Date: Wed Sep 02, 1992 4:01 pm PDT
- >From: Ray Pass
- >Subject: Finding non-dups via SQL
- >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.
-
- Have you tried the relational operator EXCEPT:
-
- proc sql;
- title1 'Cases in file1 and not in file2';
- select caseno from file1
- except
- select caseno from file2
- ;
- ... PROC ETC ...
-
- >Date: Wed Sep 02, 1992 5:48 pm PDT
- >From: Jim Clark
- >Subject: SQL again - Conflict between WHERE and OBS option
- >54 select
- >55 max(dep), max(crs), max(sec), max(ins), 0, ., ., ., ., .,
- >max(n), mean(mn)
- >56 from freq
- >57 where qn<26
- >58 group by dep, crs, sec, ins;
- >ERROR: A where clause may not be used with the FIRSTOBS or the OBS data set
-
- In all procs WHERE and OBS/FIRSTOBS are mutually exclusive. HOWEVER, look
- at the PROC SQL <options>; there is one to control the number of
- observations (I think) and the number of loops (essentially a "govenor" of
- sorts).
-
- +------------------------------------------------------------+
- | MCI Mail: JSchunk or 100-7026 |
- | Telex (MCI/WUI): 6501007026 Ans: 6501007026MCI UW |
- | Internet: JSchunk@MCIMail.Com |
- | X.400: G=joseph; S=schunk; ADMD=mci; C=us; |
- +------------------------------------------------------------+
-