Atos interview question

Reverse a string dynamically logic DB2 concepts on cursor