Hi guys... I need your help on a topic.. I have a DB2 file with a field of 300 char with some information related to transfers.. for this field I need to retrieve a substring and currently I don't figure out to find exactly the position..
the statement is this:
SELECT RESULT FROM TRLOG
This is why I have in RESULT field:
RESULT='sftp> cd home/RMTUSR/ sftp> lcd /home/LCLUSR sftp> put CLIENT_CLIENT Report_clients.txt sftp> quit Transferred: sent 13664'
Can you help me please with this.. I builded this until now:
SELECT substring( substring(RESULT,POSITION('put ' in
RESULT)+4 ),10) FROM TRLOG
but.. I need to split more to get report name, namely Report_clients.txt:
CLIENT_CLIENT Report_clients.txt sftp> quit Transferred: sent 13664
the statement is this:
SELECT RESULT FROM TRLOG
This is why I have in RESULT field:
RESULT='sftp> cd home/RMTUSR/ sftp> lcd /home/LCLUSR sftp> put CLIENT_CLIENT Report_clients.txt sftp> quit Transferred: sent 13664'
Can you help me please with this.. I builded this until now:
SELECT substring( substring(RESULT,POSITION('put ' in
RESULT)+4 ),10) FROM TRLOG
but.. I need to split more to get report name, namely Report_clients.txt:
CLIENT_CLIENT Report_clients.txt sftp> quit Transferred: sent 13664
Comment