Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I am having junk values in a filed like below. There is a special characters included and the value is repeating n times.
¤IS North America;¤IS North America;¤IS North America |
¤North America;¤North America;¤North America |
¤One IS Office;¤One IS Office;¤One IS Office |
Please suggest me to restrict the junk values and to show only single value in the field .
Like
IS North America
North America
One IS Office
Thanks
krishna
Perhaps like this:
subfield( KeepChar(Field_With_Junk, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ;'), ';', 1)
if all values belong to same scheme you may use (use fieldname instead of text)
=purgechar(SubField('¤IS North America;¤IS North America;¤IS North America',';',1),'¤')
Hi Gysbert,
Thank you for your valuable reply. It's not working as you suggested.
My code is
A :
.............
Units L
.............
...........
.........................
left join (A)
LOAD ID,
concat(subfield( KeepChar([Units L], 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ;'), ';', 1),';') as [Units L1]
Resident A
Group By ID;
A :
.............
Units L
.............
...........
.........................
That doesn't look like a valid load statement to me. So I wouldn't expect that to work.
Hi Gysbert,
............... it means that there is some fields in the table.
Please find the below script
A:
LOAD
[ YearMonth],
[Id ] as ID,
[ Units L1],
[ Units L1 Id],
[Units L2],
[Units L2 Id],
[ Units L3],
[ Units L3 Id],
[ Units L4],
[ Units L4 Id],
[ Units L5],
[ Units L5 Id]
FROM $(vQVD)\X.qvd
(qvd);
left join (A)
LOAD ID,
concat(subfield( KeepChar([Units L], 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ;'), ';', 1),';') as [Units L1]
Resident A
Group By ID;
Can you post that X.qvd file. Or if it's a very big file then a small representative subset of it?
KALYAN KRISHNA wrote:
A:
LOAD
[ YearMonth],
[Id ] as ID,
[ Units L1],
[ Units L1 Id],
[Units L2],
[Units L2 Id],
[ Units L3],
[ Units L3 Id],
[ Units L4],
[ Units L4 Id],
[ Units L5],
[ Units L5 Id]
FROM $(vQVD)\X.qvd
(qvd);
left join (A)
LOAD ID,
concat(subfield( KeepChar([Units L], 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ;'), ';', 1),';') as [Units L1]
Resident A
Group By ID;
I am not seeing any more the [Units L] Field
concat(subfield( KeepChar([Units L], 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ;'), ';', 1),';') as [Units L1]
Does It you are facing Issue
Then Figure out where do you vi-sibling that Field
Hi
Can you try lookign at the PurgeChar example here?