I have a String field that contains data like: "1;2;3". I built the DSL statement that gets the "2nd subfield" from this string ("2"), but it's still a String, and I need to convert it to Integer. How can I do this?
final Field<Integer> status = decode().when(TABLE.EVENTID.eq("vp1s"), CsvSplitter.getCsvField(STATISTICSDAILYSUMMARY.EVENTVALUE, ";", 1).HOW_CAN_I_CONVERT_IT_TO_INTEGER?).otherwise(0);
public class CsvSplitter {
public static Field<String> getCsvField(Field<String> field, String delimiter, int pos);
}