Hi @CarishmaM , if the length of the string varies, then you have to rely on the length() function as @ipazin suggested.
However, you mentioned that you are dealing with a column of 12 digit numbers. Are they always 12 digit? If that is the case, then your requirement can be rephrased to you want to keep the first 6 digits, which can be done simply by: substr($columnname$, 0, 6)
Hi @ipazin , you did not make a mistake. Your suggestion for length() actually is answering the request, which is to remove the last 6 digits, and might still be the solution to use if the column is not consistent with 12 digits. My solution works only if the column always has 12 digits.
I also tried that solution. However, I still receive an error message for Line 65 and Line 66. All of the cells in the column are 12 digits.However, I am not sure if the fact that Knime is reading the numbers as 2,222,222,222…
Hi @CarishmaM , the substr works only with string columns, but your MTN column is a Double column, so you can cast your column to string in your manipulation, like this: substr(string($MTN$), 0, 6)
or substr(string($MTN$), 0, length(string($MTN$)) - 6)
Similarly for the regex that you are trying from @Daniel_Weikert 's suggestion, this would work on a string column only, so you have to cast your column to string there too if you want to use regex.