Home Forums SQL Server 7,2000 T-SQL SELECT FROM a WHERE {end bit of field} not in B..? RE: SELECT FROM a WHERE {end bit of field} not in B..?

  • Maybe something like:

    
    
    select * from Table2
    where substring(email, charindex('@', email) + 1, len(email)) not in
    (select domain from Table1)

    Assuming of course that email is not null and will always contain a valid email address.

    Cheers,

    mia

    Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.


    Cheers,
    mia

    Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.