In a db query, the values in the WHERE statement must be surrounded by quote characters unless they are numeric. In order to use the value of a variable in a database query in QIE you have to add the quote characters to the variable in the WHERE statement using the + character. Below is an example of the code.
// Declare the required variables
var lastName = message.getNode('RXA-10.2');
var firstName = message.getNode('RXA-10.3');
var suffix = message.getNode('RXA-10.5');
var login = (lastName + ' ' + suffix);
// To use the variables surround them with quotes(" + variable + ")
var queryResult = qie.doQuery(
"CPS DB",
"select loginName\n" +
"from USR\n" +
"where lastName = '" + login + "'\n" +
" and firstName = '" + firstName + "'");
message.setNode('RXA[@9.1=00]-10.1', queryResult.getNode('loginName'));