I have the following Golden Query that I am trying to and it is giving me this error message. When query is ran in Golden, it gives no issue. Only when put into the Execute Query activity:
Kindly mention like this when using variable
CRTD_DTT > @starttime
That is use a assign activity like this
And mention as Str_starttime = Now.AddHours(-1)
Then in EXECUTE QUERY
And pass the input sql statement in a single line as
“SELECT CUST_CD,FRM_SHPG_LOC_CD,TO_SHPG_LOC_CD, SHPM_NUM, SHPM_DESC, CRTD_DTT, PLAN_ID
FROM SHPM_t
WHERE
CRTD_DTT > @str_starttime
AND SHPM_NUM not like ‘SH-%’
AND CUST_CD = ‘FLNA’
order by CRTD_DTT desc”
Maybe like this right? SELECT CUST_CD,FRM_SHPG_LOC_CD,TO_SHPG_LOC_CD, SHPM_NUM, SHPM_DESC, CRTD_DTT, PLAN_ID FROM SHPM_t WHERE CRTD_DTT > && (sysdate - 1) AND SHPM_NUM not like 'SH-%' AND CUST_CD = 'FLNA' order by CRTD_DTT desc
sorry one char was missplaced: SELECT CUST_CD,FRM_SHPG_LOC_CD,TO_SHPG_LOC_CD, SHPM_NUM, SHPM_DESC, CRTD_DTT, PLAN_ID FROM SHPM_t WHERE CRTD_DTT > (&&sysdate - 1) AND SHPM_NUM not like 'SH-%' AND CUST_CD = 'FLNA' order by CRTD_DTT desc
oh im sorry, we should remove those && and not put them near sysdate…
SELECT CUST_CD,FRM_SHPG_LOC_CD,TO_SHPG_LOC_CD, SHPM_NUM, SHPM_DESC, CRTD_DTT, PLAN_ID FROM SHPM_t WHERE CRTD_DTT > (sysdate - 1) AND SHPM_NUM not like 'SH-%' AND CUST_CD = 'FLNA' order by CRTD_DTT desc