以下のように、特定のフィールドのデータ長はランダムです。
特殊文字の前の文字だけを選択したい。
サンプル:
123456_3
454656484784_13
15051514745_7
期待される結果は次のとおりです。
123456
454656484784
15051514745
    一般的な例:
substring(your_data, 0, instr(your_data, '_'))
第一部を入手するには
select substr(your_column, 1, INSTR(your_column, '_') - 1) 
from your_table
最後の部分を取得するには
select substr(your_column, INSTR(your_column, '_') + 1) 
from your_table
    迅速かつ汚い-Oracle/Sybaseの手順などの単一のステップでこれを行う方法を理解できます...
-- Ignore 0 or negative numbers --
-- This gives you your end pos for substr --
SELECT distinct(Instr('123456_3 454656484784_13 15051514745_7', '_', LEVEL)-1) substr_end_pos
  FROM dual
  CONNECT BY LEVEL < length('123456_3 454656484784_13 15051514745_7') 
  /
 -- This is start pos for substr --
 SELECT Distinct(Instr('123456_3 454656484784_13 15051514745_7', ' ', LEVEL)+1)  substr_start_pos
   FROM dual
   CONNECT BY LEVEL < length('123456_3 454656484784_13 15051514745_7')
  /
 -- These are substr start/end numbers returned by above queries --
 Select Substr('123456_3 454656484784_13 15051514745_7',  1, 6) From dual -- substr_start_pos=1, substr_end_pos=6
 /
 Select Substr('123456_3 454656484784_13 15051514745_7',  10, 21-9) From dual -- substr_start_pos=10, substr_end_pos=21-substr_start_pos-1
 /
 Select Substr('123456_3 454656484784_13 15051514745_7',  26, 36-25) From dual -- substr_start_pos=26 substr_end_pos=36-substr_start_pos-1
/