I have the following WHERE clause which isn't working and I'm not too sure why.
I have explicitly stated to return select data, but if I use the 'e.cust_field' as an example, it's returning values not specified and I don't know why example '2'.
where a.comp = '0'
and a.mort_code like '%1/%'
and c.start_date >= '2020-01-01' and c.start_date <= '2020-12-31'
and substring(a.cust_no,3,7) <> 'TMU787'
and e.cust_table = '12'
and e.cust_field in ('1','3','7','17','21','29','32','35')
and e.cust_text <> '1258 testing'
Any idea why please?