Option 2:
You could also create wrapper functions in Oracle to replicate the functions 'CharIndex' and 'DatePart'. This would be the prefered syntax if the datawindow needs to run in both environments.

Option 3:
You might also change the SQLSelect dynamically just before the retrieve.