Hi, I got a string that starts with numbers,
If the code starts with “10”,“11” or “12”, then ORDER TYPE = ‘VI’
If the code starts with “13” or “14”, then ORDER TYPE = ‘MI’
case when substr(table.column,0, 2) in (‘10’,‘11’,‘12’) then ‘VI’
when substr(table.column,0, 2) in (‘13’,‘14’) then ‘’
else ‘NA’ end
How can I implement this in Knime?
If it helped you please mark it as solution so that others can also benefit from this more easily
Depending on which node you use it’s indeed either Java or Javascript. Click on the Function button to get all available options and the corresponding syntax with examples.
It’ll bring the same result, I just set the decimal as fixed value and [012] with one digit to validate, I don’t need to bring .* to select all the information because the “^” says at the begin one.
Buts, it’s ok, the result will be the same at all… And you won’t need to create a formula to test it, easier mode on…