See SUBSTR builtin function syntax.
[url]http://www.dbasupport.com/forums/showthread.php?threadid=6430[/url]