Hi
As you can see it would be very worthwhile to provide sample data reflecting the real data in first place....
In the docu for the input function you can find the special meaning for '?'. Changing your code accordingly should solve your problem:
......input(store2.product,? 8.) and input(store2.product,? 8.) ne .
data store1;
input id product $ type $;
datalines;
1 000112 refferal
2 000112 approval
3 000112 ship
4 000113 ship
;
run;
data store2;
input product $ productname $;
datalines;
112 xyz
113 abc
115 def
A15 def
;
run;
proc sql;
/* create table want as*/
select store1.*, store2.productname
from store1 left join store2
on input(store1.product,8.)=input(store2.product,? 8.)
and input(store2.product,? 8.) ne .
;
quit;
HTH
Patrick