Guys can someone please tell me what is wrong with the following SYNTAX:
set_block_property('AREA3_MVTS', onetime_where, 'where MVT_ST='||stat_value||'
and (
MVT_ORIG_CD IN (SELECT TANK_CD from TANK where TANK_AREA_CD='||''':parameter.AREA_PARAM'''||')
OR
MVT_DEST_CD IN (SELECT TANK_CD from TANK where TANK_AREA_CD='||''':parameter.AREA_PARAM'''||')
)'
);
If I replace the :parameter.AREA_PARAM with a hardcoded value say AR2, then the query is working perfectly. I am debugging my code and displaying the parameter AREA_PARAM value before using it in the Where Clause (it is exactly as the Hardcoded value) but it is not retrieving records???
Please see below Code working fine:
set_block_property('AREA3_MVTS', onetime_where, 'where MVT_ST='||stat_value||'
and (
MVT_ORIG_CD IN (SELECT TANK_CD from TANK where TANK_AREA_CD='||'''AR2'''||')
OR
MVT_DEST_CD IN (SELECT TANK_CD from TANK where TANK_AREA_CD='||'''AR2'''||')
)'
);
Any Clue what might be the problem?
Thanks