my $sth = $dbh->prepare("SELECT SUBSTR(row_data, 2, INSTR (row_data ... REPLACE (SUBSTR (row_data, INSTR (row_data, '~', 1, 22) + 2),' "',' ') ...