Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I have a field that looks like below, I need to replace the / and remove any 0 that follows immediately.
CURRENT
2455691/0023
2451987/01564
9871256/0100
OUTPUT
2455691_23
2451987_1564
9871256_100
What is the best script for this scenario?
Thanks
Replace:
LOAD *,
subfield(Input, '/', 1) & '_' & num(subfield(Input, '/', -1))as output;
LOAD * INLINE [
Input
2455691/0023
2451987/01564
9871256/0100
];
Try it with:
subfield(YourField, '/', 1) & '_' & num(subfield(YourField, '/', 2))
- Marcus
Replace:
LOAD *,
subfield(Input, '/', 1) & '_' & num(subfield(Input, '/', -1))as output;
LOAD * INLINE [
Input
2455691/0023
2451987/01564
9871256/0100
];
Hi Marcus/Vengadesh,
both script work, could you explain the subfields?
Thanks