Thursday, 17 June 2010

ESCAPE!

Just a quick and simple tip today.

If you are using TO_CHAR in PL/SQL or Oracle SQL you can escape any non-formatting characters by surrounding them in double quotes. For some reason they don't mention this on PSOUG or techonthenet.

Try it out with this SQL statement:
SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD"T"HH:MM:SS"Z"') FROM DUAL

No comments: