amazon web services - splitting a string in a mysql table field and store to two fields -
i have mysql table (in aws rds) field f1, f2 , f3. f1 has strings 'abc-def'. need split f1 values hyphen 2 strings ('abc' , 'def') , store them f2 , f3 in same row.
the record before changing:
f1: abc-def f2: f3:
the record after changing:
f1: abc-def f2: abc f3: def
it seems mysql support regexp not reference. last resort using mysqldump want see if there way in mysql directly.
any reply appreciated!
there post discusses using commas separator found @ can mysql split column?. update procedure setting 2 columns substring_index results.
Comments
Post a Comment