Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
The requirement is quite simple, but some how its not working. Could you please help a bit?
I have a Field called COLUMN with values (ABC1, DEF1, 12345678, 87654321)
I need the output with 6 chars like COLUMN(123456,876543)
Also, I have right spaces besides ABC1 and DEF1. Need to remove the spaces as well.
Hi,
Rtrim(COLLUMN) will remove the right spaces.
Left(COLUMN,6) will trim it to six charecters.
Sundar
In your case it should be
Left(Rtrim(COLUMN),6)
Please use the above function in the script itself.
-Sundar
Thanks. I tried that too, but I am not sure why I am missing the Integer values.
I am getting only ABC1, DEF1, whereas I need 123456,876543.
Don't know why!
Tmp:
load
left(trim(Field),6) as Field1
where IsNum(Field);
LOAD * INLINE [
Field
ABC1
DEF1
12345678
87654321
];
Please share a sample app.
Where are you using this formula?in the edit script?
Hi,
Try this:
IF(LEN(FIELD) = 6, NUM(FIELD))
or if you have just one row (ABC1, DEF1, 12345678, 87654321)
LOAD concat(left(trim(Field10), 6), ',') as Field10New WHERE isnum(subfield(Field10, ','));
LOAD subfield(purgechar(Field10, '()'), ',') as Field10;
LOAD * INLINE [
Field10
"(ABC1, DEF1, 12345678, 87654321)"
];