I want to query and get only itemno that does not starts with '*' (like *100037-000), and RCD not 'y' . This column is char(25). It still return * itemno in front.
SELECT ITEMNO FROM table_1 WHERE rcd not like ('*%') or rcd is not null or rcd <> 'n'
select distinct(rcd) from tables_1
results : Y, N, NULL