Hi im having difficulty in getting the latest timestamp for my job. Max function wont work neither TOP 1. i need this in order to get only the latest data using timestamp.
$G_LATEST_TIMESTAMP = sql( 'DS_STG_SOURCE', 'SELECT MAX DI_TIMESTAMP FROM STGPG.STG_EXTRACT_2 ORDER BY DI_TIMESTAMP DESC');
print($G_LATEST_TIMESTAMP);