samporras Posted July 27, 2005 Posted July 27, 2005 Hey guys...I've got a question for ya. I'm trying to create a suppression process so I can then create a list of people i want to email. So far I have 2 tables. Table A contains email addresses and another field I call suppression_type (this field will get it's value based on different types of suppression that i do). Table B contains a running lists of people that opt not to receive an email. Anyways, basically I'm running a query that matches on email addresses and then updates the suppression_type field in table A. I am currently doing this using a sub query that looks like this: >update TableA set suppression_type = 1 where rtrim(ltrim(Email) in (select ltrim(rtrim(Email)) from TableB) and suppression_type is null I tried running counts using this sub query and then using another query that has an inner join (should do the same thing right?). I noticed that the counts were higher using an inner join. Here's the query I ran: >select count(*) from TableA as A inner join TableB as B on A.Email = B.Email Where A.suppression_type is null Can anyone explain the difference between these two and why they would be off? Thanks so much for your help! -Sam Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.