public function getSubstringExpression($value, $from, $length = null)
{
if (!is_null($length)) {
return 'SUBSTRING(' . $value . ', ' . $from . ', ' . $length . ')';
}
return 'SUBSTRING(' . $value . ', ' . $from . ', LEN(' . $value . ') - ' . $from . ' + 1)';
}