I am using below Javascript. When I debug the ‘FinalWQLSelectQry’ I am expecting the value to be passed in where clause. But when I debug i get where clause as
WPA_LoadTimestamp >=‘lastupdate’
How to pass date value in the SQL query within javascript ?
var headerdata = context.getVariable('request.header.data');
var lastupdate = context.getVariable('request.queryparam.lastupdate');
if (headerdata === 'active')
{
var SQLSelect = 'SELECT ASOFDATE,WPA_LoadTimestamp,EMPLID,FIRST_NAME_PRIOR FROM cds_WD_MMC_ActiveEE_DELTA_TBL WHERE (FIRST_NAME_PRIOR IS NOT NULL OR isLEGAL_PRIOR IS NOT NULL OR isTECH_PRIOR IS NOT NULL OR isCIO_PRIOR IS NOT NULL) and WPA_LoadTimestamp >=' + '\'lastupdate\'';
}
var FinalWQLSelectQry = SQLSelect;
context.setVariable('FinalWQLSelectQry', FinalWQLSelectQry);
{
“error”: “invalid request: WQL error.”,
“errors”: [
{
“error”: “There was an issue resolving the WQL query.”,
“location”: “Invalid WHERE clause”
}
]
}