This message serves for Google indexing. It only includes the first message of each thread from technical forums. To see the entire thread, the solutions and the technical content related to each message, you need to log in by going to the main page. This can be done at http://www.universalthread.com. If you do not have an account, we encourage you to create one now and start participating in Microsoft .NET and SQL Server related technology forums, just to name a few. Our database contains nearly two millions valuable high end technical messages. Thanks for the generous contribution to everyone who participated on the site so far, including MVP, Microsoft employees and many other well known contributors. The valuable content of the Universal Thread has created a history of 16 years of high end technical content which has helped many consultants, developers and many others in the industry on a daily basis. The site also offers a subscription option that greatly enhances your site experience.


View message
From30/07/1997 13:47:09
Jeff Rusch #008290
University Wisconsin-Madison
Madison, Wisconsin, United States
To  
All


I am using the following select statement to select data from one table that doesn't exist in another table. I need to modify it so it selects only data that doesn't appear in the first table or in another table. The select statement currently returns 1303 records. I tried modifying the WHERE clause to read: WHERE (a.ssno NOT IN (SELECT b.ssno FROM helth_priors_tmp b) AND (a.ssno NOT IN (SELECT b.ssno FROM helth_currents_tmp b)

But that returns 29909 records! Any ideas?

SELECT a.dedtype, mnpd, name, prsnid, unit, div, dept, subdept,;
eeclascd, prioradj, a.ssno, a.sortkey, famsingl, frfamsng, dedamnt,;
termcode, paidthru, addcode, adjamt, adjmonth, efctdate,;
a.user_comment;
FROM helthins_view a;
WHERE a.ssno NOT IN (SELECT b.ssno ;
FROM helth_priors_tmp b);
INTO cursor cHelth_tmp3


Jeff