Character to Number format conversions in qlikview
I have an field which is being fetched from the DB using the format TO_CHAR(A). It will have 15 digits value like 328956000000532 randomly but in an String format because of the TO_CHAR Function. The problem is that now i need to get the first four digits of the field A which i have done through the function Left(A,4). Through this i got the first four digits separately. But now the problem is that i need to put another function which is an ApplyMap('XMapping',Left(A,4)) which is not happening as i am getting an error Syntax Error : Missing\Misplaced From . Without this Apply Map the dashboard is running fine. Any inputs on what could be the issue?
My guess is that since it is convert to Character through sql query it is not being able to map with the mapping table where the values are present as Number only.
P.S : I have used the Num Function to convert the TO_CHAR value to an number but still getting the same issue. The value when put in an list box comes as Numeric only. is there any way to know whether the num function has applied correctly and the value is coming as Number format only?
All the required mapping Tables is present and there is no wrong in the Mapping syntax also because i have one more mapping column and it runs perfectly the only problem i think is in the conversion to number.
Re: Character to Number format conversions in qlikview
Everything here looks good to me, except a closing square bracket (which you might have missed it here since this is just a sample script and not the original script). Also, I assume TO_CHAR(ID) is a sql generarted field which probably was not renamed, because QlikView doesn't have a TO_CHAR function