problem with axapta execute query

hi all,

im having a problem with execute statement in axapta,

for whole table the query

ax.executestmt( select * from %1)

works fine but including the where clause it throwing error

ax.executestmt(select * from %1 where %1.Name=“rafa” and %1.Rank=“first”)