oracle - drop everything to the right of a hyphen in sql -
i using oracle sql developer 2012. data looks 'valuea-valueb'
. want strip content after -
, populate rest.
you can use combination of substr
, instr
:
select substr(my_column, 1, instr(my_column, '-') - 1) my_table
Comments
Post a Comment