티스토리 뷰

인포믹스의 substring은 다른 언어에 비해서 다소 복잡하다.

SUBSTRING Function |--SUBSTRING--(--source_string--FROM--start_position--+-------------+--)--|     '-FOR--length-'    

substring(source from 시작인덱스 for 길이)

여기서 start position 은 1부터 시작한다.


예제를 보며 익혀보자

substring(20161201 from 1 for 6)

하면 결과는

201612

가 된다.

SELECT SUBSTRING('ABCDEFG' FROM 3 FOR 2) FROM mytable;

The following table shows the output of this SELECT statement.

(constant)CD


댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함