Wednesday, 11 July 2018

Memilih Nilai Ke-n Pada Data Yang Dipisahkan Oleh Pembatas

Status : Draft

Dikutip dari [1] :
In general, to select the N-th value from a string VALUES that contains values separated by delimiter DELIM, you have to use: 
SUBSTRING_INDEX( SUBSTRING_INDEX( VALUES, DELIM, N ), DELIM, -1 )

Referensi


  1. MySQL: select the n-th element from a delimiter separated value set, http://www.giannistsakiris.com/2015/01/23/mysql-select-the-n-th-element-from-a-delimiter-separated-value-set/


No comments:

Post a Comment