Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!transit3.readnews.com!postnews.google.com!j19g2000pro.googlegroups.com!not-for-mail From: John Kim Newsgroups: comp.databases.ms-sqlserver Subject: checking against issue numbers Date: Thu, 10 Nov 2011 01:27:52 -0800 (PST) Organization: http://groups.google.com Lines: 39 Message-ID: <1dfca3dd-26e4-4cf2-afbb-0a46d60720d8@j19g2000pro.googlegroups.com> NNTP-Posting-Host: 98.119.3.86 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1320917386 21242 127.0.0.1 (10 Nov 2011 09:29:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Nov 2011 09:29:46 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j19g2000pro.googlegroups.com; posting-host=98.119.3.86; posting-account=YuNwKAoAAAD27p1aW3mFHzN0IF6IvarC User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET CLR 3.0.30729; .NET4.0C; BRI/1; InfoPath.3; yie9; Alexa Toolbar; GTB7.2),gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:788 I run online based study guides program. I email out new issues every week, mon / wed / friday. I have new sign ups every week. and each of these sign ups, I need to follow up on the issues subscribers haven't attempted. In one table, I have last issue numbers sent out so far. So Week #1 - issue 12, Week #2, issue 9, Week #3, issue 6, and so on. I download each subscribers log in and study guide attempt record thru online MySQL table, and import to MS SQL. I need to check these records against above mentioned table. So for example, if Week #1 signed up student has attempted issue 1, 2, 3, 4, 7, and 8, but didn't do all of issues sent up to issue 12, I need to come up with SQL code that will generate issue 5, 6, 9, 10, 11, and 12.. which are issues this student has not attempted as of yet. Can anyone tell me / help me with SQL code that will check these attempted issue number records against issues sent out thus far table record and come up with issues not attempted as of yet?? ... let's say, the table says Week #2 is sent to up to issue #9. But downloaded MySQL records show only issue 1, 2, 3, 5, and 8 are attempted.. Then SQL code should check these 1, 2, 3, 5 and 8 against Up to Issue 9 in the table.. in this case up to Issue 9, and come up with Issue 4, 6, 7, 9. The table only has the data of issue 9; the last issue number sent out so far.. Another table shows records of issue numbers of all attempted issue. So issue 9 should be checked against issue 1, 2, 3, 5 and 8.. and come up with 4, 6, 7, 9. Could anyone please help me with SQL code to compare these two table .. and come up with issues not attempted?? thanks.