pattern matching in redshift

0

there is a text and i would need to find the word SUBSTR(
How can i acheive?

KN
已提問 1 年前檢視次數 194 次
1 個回答
1

You can use the position or charindex functions.

dev=# select position('SUBSTR(' in 'jakjasf;kljksfjdsSUBSTR(kjasdkjadsjfjk');
 position 
----------
       18
(1 row)

dev=# select charindex('SUBSTR(', 'jakjasf;kljksfjdsSUBSTR(kjasdkjadsjfjk');
 charindex 
-----------
        18
(1 row)
profile pictureAWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南