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

Split a contatenated field into its parts

Hi,

I have a field which contains four values separated by three '-'.

I would like to load the table containing this field into another table with four fields instead of the concatenated one.

What commands I need to do this?

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

LOAD

     subfield(FIELD,'-',1) as F1,

     subfield(FIELD,'-',2) as F2,

     subfield(FIELD,'-',3) as F3,

     subfield(FIELD,'-',4) as F4,

...

FROM ...;

View solution in original post

2 Replies
swuehl
MVP
MVP

LOAD

     subfield(FIELD,'-',1) as F1,

     subfield(FIELD,'-',2) as F2,

     subfield(FIELD,'-',3) as F3,

     subfield(FIELD,'-',4) as F4,

...

FROM ...;

juleshartley
Specialist
Specialist

I think you can use subfield...

subfield(Fieldname, '-', 1) as Field1,

subfield(Fieldname, '-', 2) as Field2... etc.