Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Sperate an single field

Hello

if have a field look like this

1|caca|as

123|asd|r

1234|ssdsd|2

i need to separeta this example

first field           secondField    third Field

1                        caca                 as

123                    asd|                  r

1234                  ssdsd              2

Hope you can help thanks


8 Replies
mario-sarkis
Creator II
Creator II
Author

or it is enough to extract the first field and rest still concatenate

Thanks

arulsettu
Master III
Master III

try this

SubField('1|caca|as','|',1) as field1,

SubField('1|caca|as','|',2) as field2

SubField('1|caca|as','|',3) as field3

sasiparupudi1
Master III
Master III

SubField('1|caca|as','|',1)  as Firstfield

SubField('1|caca|as','|',2)  as Secondfield

SubField('1|caca|as','|',3)  as Thirdfield

Kushal_Chawda

SubField(YourField,'|'1) as field1,

SubField(YourField,'|',2) as field2

SubField(YourField,'|',3) as field3

mario-sarkis
Creator II
Creator II
Author

hi KUSH

if my fied looks exactly like this :

42216|Services|Dial Up Internet

42216|Services|Domiciliations

42216|Services|Pin Pay

42216|Services|Safe Box

42216|Services|Sweep

42248|Accounts|403

42248|Accounts|421

42248|Accounts|427

42248|Accounts|461

42248|Accounts|462

I don't want to seperate but only want to replace '42248' by '42247'

Hope you can help

sasiparupudi1
Master III
Master III

something like this?

if( substringCount(YourField,'|')>1 and SubField(YourField,'|',1)=42248,replace(YourField,4248,4247),YourField))

Kushal_Chawda

You can do something like this

if(SubField(Field,'|' ,1)='42248', Replace(Field,SubField(Field,'|' ,1),'42247'),Field)  as Field1

But where you want to show this value ? In Field 1 or Filed 2 or field3?

qlikmsg4u
Specialist
Specialist

Load *,Replace(Test,42248|,42247|) as Test1;

Load * Inline [

Test

42216|Services|Dial Up Internet

42216|Services|Domiciliations

42216|Services|Pin Pay

42216|Services|Safe Box

42216|Services|Sweep

42248|Accounts|403

42248|Accounts|421

42248|Accounts|427

42248|Accounts|461

42248|Accounts|462

];