Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Remove first and last comma

Hi All,

I have a field with comma separated values, like below

, PB , D , 28006 , 0 , 0 ,   9 ,

I am using SUBFIELD(MyField,',',) as MyNewField

however I keep getting blank values for the first and last comma

I want to remove the first and last comma while still using the above SUBFIELD Function

Regards

Alan

16 Replies
rbecher
MVP
MVP

How the field content looks if it doesn't start with a comma? Is there a value for the first subfield? I would guess it has the same structure..

Astrato.io Head of R&D
rustyfishbones
Master II
Master II
Author

Hi Ralf,

There does not seem to be any value before the first comma

Regards

Alan

rustyfishbones
Master II
Master II
Author

Thanks Henric,

But that does not seem to be working

Regards

Alan

rbecher
MVP
MVP

Then please post an example with the different content..

Astrato.io Head of R&D
rustyfishbones
Master II
Master II
Author

Hi Ralf,

Please see the attached file

Regards

Alan

rbecher
MVP
MVP

..but how you will handle those different record types/structures? Do you have the record descriptions? If not I think the values are meaningless.

Astrato.io Head of R&D
rustyfishbones
Master II
Master II
Author

Hi Ralf,

I think you are correct, the Database Structure was written by the MD, I am meeting him shortly, I just wanted to try so I have an answer to give him.

I done a SUBSTRINGCOUNT and some strings contain 256 values, it's crazy

Thanks everyone for their help

Regards

Alan