Added sql function SUBSTR.