Let's go through the logic of your subsetting if statement.
The first record x=12, y=as
Your logic: if y ne 'as' or y ne 'aq';
y ne 'as', so that is false
y ne 'aq', so that is true
With an OR statement any true resolves to true, hence false or true will resolve to true. With an AND both statements need to be true for it to resolve to true, which is why the AND works and the or does not
BTW: SAS has a function called NOTDIGIT which searches a character string for any character that is not a digit and returns the first position at which that character is found
* For Example;
data sample2;
set sample;
num_check=notdigit(strip(y));
run;
data what_i_want;
set sample2;
if num_check then delete;
run;