There is a table of the form:
col1 | col2 | col3 ------+--------+-------------- text11| text21 | 1234567890123 text21| text22 | 3210987654321 text31| text32 | 2342342554455 It is necessary to make a selection from the table table, containing the values of the columns col1 and col2 completely, and from the values of col3 take only the first 10 digits.
The problem arises with col3 , I can not figure out how to make a sample. There are thoughts to use regular expressions. but I don’t know how to regexp ^\d{1,10} to the request
SELECT col1,col2,substring(col3 from '^\d{1,10}') FROM TABLE? - MaxU