Thought I'd leave this answer here as well in case it works for you:

You can try setting up a filter that only looks for emails that are NOT from the intended recipients. In the case you list int he question, you would set up your filter like this:

Doesn't have: a@a.com, b@b.com (Delete it)


This means that the filter selects everything unless it either comes from these addresses, or contains these addresses somewhere in the email thread.

By using the "Doesn't have:" field, this allows you to reply to the thread, have a non-contact reply, and still have the thread safely reach the inbox.

How to accept email *only* from white-listed addresses in Gmail?
i have a table

Id Number
1   9
2   10
3   12
4   19
5   20


select Id where Number is closest to 18
it should return row 4 which is 19

how do i write this in linq and tsql? thanks
