Reputation: 191
I have list of string values like this
32HK9932GH
223943201
ISAO0-32135950142
9320WS0342/11
for all rows where appliable, i need to remove the "/" character, and everything that goes after it
how to do that? thx
Upvotes: 0
Views: 1151
Reputation: 1290
Try with substring
SELECT SUBSTRING(col,0,POSITION('/' IN col)) FROM table
Upvotes: -1
Reputation: 1269553
One method is to use regexp_substr()
:
select regexp_substr(col, '^[^/]*')
Upvotes: 2