I'm currently testing out a trial version of qrules and am running into the some of same issues described in this post. I've put my concat statement into the command line formula and it verifies correctly. My statement is:
concat("ModifySqlQuery /dsname=VW_DIM_INF_APPR_CURRENT /where=where DEPT = '", DEPT, ...