Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
Is there any possibility to split the Field in script into Field values to rename them Ie., I am loading the data from excel sheet where Feild
is identifier consists like below attachment.But i want to rename them as A for 1st record, B for 2nd and so on how to do.
I have read some post on this subject without to find a solution understandable for me.
thanks in advance.
Field names refer to columns, whereas record numbers refer to rows, so I am confused as to what you are asking. I suggest that you post an example qvw and/or some source data and your desired results.
EDIT please don't upload these as image files.
Can you please give more details with source and expected output....
Subfield function based on the point character would allow you to divide up this field, but you would still need to have a subfield for each one you want to split out.
hi,
record refer to rows ie., i have field Identifier which is having 5 records which i has to rename like 2.16.840.1.114416.1.24.132565 as A and so on is it possible
Try using String functions:
Data:
LOAD Identifier
,SubField(Identifier, '.', 1) as SubField1
,SubField(Identifier, '.', 2) as SubField2
,SubField(Identifier, '.', 3) as SubField3
,SubField(Identifier, '.', 4) as SubField4
,SubField(Identifier, '.', 5) as SubField5
,SubField(Identifier, '.', 6) as SubField6
,SubField(Identifier, '.', 7) as SubField7
,SubField(Identifier, '.', 😎 as SubField8
,Left(Identifier, 17) as Left
,Right(Identifier, Len(Identifier) - 18) as Right
,Mid(Identifier, 6, 12) as Mid
FROM
(ooxml, embedded labels, table is Sheet1);
The results:
hi,
thanks for the response. but what i want is that single record should be renamed as A,B respectively.
Could you please give an example?
Let's assume you have a table from one field that contains 6 records:
Identifier |
2.16.840.1.114416.1.24.132565 |
2.16.840.1.114416.1.24.132574 |
2.16.840.1.114416.1.24.132586 |
2.16.840.1.114416.1.24.132590 |
2.16.840.1.114416.1.24.1382597 |
2.16.840.1.114416.1.24.1382622 |
What results do you expect?
This sounds like a simple apply map on a concatenated/compound key value.
MAP_8PartKey:
LOAD * INLINE [
8PartKey, Name
2.16.840.1.114416.1.24.132565, A
];
and then in your table load you can reference
ApplyMap('MAP_8PartKey',[key field]) as FieldName
this is what i am expecting
Identifier
2.16.840.1.114416.1.24.132565 A
2.16.840.1.114416.1.24.132574 B
or
Identifier
meter A
meter B