select resak.resak001,resak.resak002,resak.resak005,resak.resak006, resal.resal001 AS EXPR3, resak.resak015 AS EXPR4, resal.resal002
FROM resak INNER JOIN
resal ON resak.resak015 = resal.resal001
where resak.resak001!='9999' and resak.resak001 !='1947'