使用SUBSTR实现字符串截取:
SUBSTR(string, Nstart, Nend) AS stringnew
比如:
(1)截取字符串前10位
string = '20190604080910'
Nbegin = 1
Nend = 10
SUBSTR(string, Nbegin, Nend) AS stringnew
则:
stringnew = '2019060408'
(2)截取字符串后6位
string = '20190604080910'
Nbegin = 9
Nend = 14
SUBSTR(string, Nbegin, Nend) AS stringnew
则:
stringnew = '080910'