Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, The above image shows the ID with string values.
How do I split the individual string values into its own subfield?
I have managed this;
PO_RECEIPTS_tmp:
NoConcatenate
LOAD
PO_RECEIPTS__ID,
PO_REC_PO_ORDER,
"PO Creditor",
"Rec Status",
"Rec Order",
substringcount("Rec Order",'ý') + 1 as Rec.order.count, //Number of subfields in Rec order
//PO_REC_STATUS_DISP as [PO Status],
PO_REC_COMPLETE,
PO_REC_DATE,
PO_REC_PERIOD,
PO_REC_YEAR,
PO_REC_TOTAL
FROM [lib://CDC_QVD_ALL/OZONE/Transaction Data/PO_RECEIPTS.qvd]
(qvd);
for i = 1 to Rec.order.count // should go from 1 to subfield count?
LOAD
SubField("Rec Order",'ý', $(i)) as Rec.order
Resident PO_RECEIPTS_tmp;
next i
There is no need for fancy loops if you use the two parameter version of the subfield() function:
LOAD SubField([Rec Order],'ý') as RecOrder
FROM [lib://CDC_QVD_ALL/OZONE/Transaction Data/PO_RECEIPTS.qvd] (qvd);
Appreciate the help!