I'm extracting some records and I want to exclude some of them from being extracted.
So I say
SELECT * from member
where individual ref notin (select individual_ref from attribute where attribute.attr_code_ref = 1242 and individual_ref isnotNULLand valid_to < getdate())