Can any body please let me know any error in this syntax
$v_txn_id=sql('Datastore name','SELECT min(TRANSACTION_ID) FROM "XXXXX"
where (erp_last_update_date) >= CONVERT(DATETIME,REPLACE({$p_input_date}, \'-\', \'.\'), 120)
and (PRODUCT_CODE) is null ');