2016-08-08 4 views
-2

어떻게 그냥 게시 할 문자열의 위치가 여기에 예를-9.3 PostgreSQL을 +Postgresql 함수는 Excel에서 Find()와 유사합니까?

에 지정된 인덱스에서

find('ranranran','an',1) should output 2 
find('ranranran','an',3) => 5 
find('ranranran','an',6) => 8 
+1

http://stackoverflow.com/questions/31059437/converting-function-from-oracle-to-postgresql 저는 이것이 당신에게 유용 할 수 있다고 생각합니다. – pepper42

+1

[PostgreSQL 문서] (https://www.postgresql.org/docs/current/static/functions.html)를 읽으셨습니까? –

+0

@muistooshort 예 그렇습니다. 그러나 곧장 앞으로 나아갈 수있는 기능은 없습니다. – vairowalia

답변

0

내가 발견 한 대답을 시작 찾을 수 있습니다.

strpos(substr('withintext',pos),'texttofind') + (pos-1)