Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field with different values. I want to make subfield also using crosstable, so that the subfield result is in one column. My script looks like this
Partners_TMP:
CrossTable(БИН,Country_ID,1)
LOAD DISTINCT
BIN,
trim(SubField( STRANI_UCHASTNICI, ',')) as STRANI_UCHASTNICI
FROM [lib://SBR (statdata_g.abzhanova) (statdata_aru.mussina)/JPBIN.qvd]
(qvd)
where not isNull (BIN);
NoConcatenate
Partners:
load Distinct
BIN as БИН,
Country_ID
Resident [Partners_TMP];
drop Table [Partners_TMP];
My data looks like this:
The problem is when i made subfield it separated each value in the row, but i need to make subfied inly for distinct value. Help me to solve this problem.
Could you provide an example of what you want to obtain?
A liltle part of my data
This is your source or the result you want? Could you illustrate what you have in input and what you want as output?
This is not a result. this is a data i need to transform.
Actually i need to transform the second field "STRANI_UCHASTNICI".
This is the input data:
The output should be like this. I need extract values from a row, only DISTINCT value.
Typically this is easiest to handle with a preceding load:
Load distinct *;
LOAD
BIN,
trim(SubField( STRANI_UCHASTNICI, ',')) as STRANI_UCHASTNICI
FROM [lib://SBR (statdata_g.abzhanova) (statdata_aru.mussina)/JPBIN.qvd]
(qvd)
where not isNull (BIN);
Thank you, but i already used this one also. It doesn't help.
This is weird, I don't see why your solution would not work.
Could you try to stop before you use the concatenation and have a look to the result of the first statement only? Or to store the result? Maybe having a look to this result will help to understand why this is not working as expected.
Thank you very much for your answer, i already have found the solution.