Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Subfield for field

Hello Experts,

I have following urgent requirement where i have a field which contains data as mention in Customername column i want to remove ; symbol from column and get the values but trying not get.

Customerdetail

  124;9999124

  123;9999123

  125;9999125

  129;9999129

  121;9999121

Emily

1 Solution

Accepted Solutions
its_anandrjs

You have to load a resident load for that like

T:

LOAD * INLINE [

    Customername

    124;9999124

    123;9999123

    125;9999125

    129;9999129

    121;9999121

];

FinalData:

LOAD

Customername,

SubField(Customername,';',1) as Extcode,

SubField(Customername,';',2) as syscode

Resident T;

DROP Table T;

And after that you get 3 fields named as you mentioned.

Regards

View solution in original post

9 Replies
its_anandrjs

Try to create a field like

=SubField(Customerdetail,';')

rustyfishbones
Master II
Master II

Try

SUBFIELD(Customername,';',)

Not applicable
Author

Thanks but actually i want only first 3 letters and before ; please help i am new.

Thanks again

rustyfishbones
Master II
Master II

then try

SUBFIELD(Customername,';',1) as Cutomername

its_anandrjs

Then try like below code

SubField(Customername,';',1) it will give you first three letters like

124

123

125

129

121

rustyfishbones
Master II
Master II

or try

LEFT(Customername,3) as Customername

but only if it is always only 3 letters

cfz
Former Employee
Former Employee

Hi Emily,

You can use the function PurgeChar as in the attached example.

I hope it helps.

Carlos

Not applicable
Author

Yes it works will it be possible if i obtain or say extract the two fields one is before ; and second after the ; symbol and after that i need a three fields.

CustomerName, Extcode with 3 letters and after that ; syscode

Thanks


its_anandrjs

You have to load a resident load for that like

T:

LOAD * INLINE [

    Customername

    124;9999124

    123;9999123

    125;9999125

    129;9999129

    121;9999121

];

FinalData:

LOAD

Customername,

SubField(Customername,';',1) as Extcode,

SubField(Customername,';',2) as syscode

Resident T;

DROP Table T;

And after that you get 3 fields named as you mentioned.

Regards