Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have one scenario, I am having different fields for example
FieldA FieldB FieldC
25 67 WQ
G D 12
-- 34 00
65 * *
Now I need to concatenate the above 3 fields FieldA,FieldB and FieldC in to one new field and i need to get all three field values into new field.
Can any one tell me which function I need to use for this?
Thanks in advance
Thanks,
Chinnu.
Use
FieldA & FieldB & FieldC as CombField
Regards
Pratyush
You can potentially use the CROSSTABLE LOAD prefix
or just load your table three times, renaming the field to a common field name one after the other
LOAD A as Common
RESIDENT ...;
LOAD B as Common
RESIDENT ...;
LOAD C as Common
RESIDENT ...;
Hi Pratyush,
Thanks for your quick reply, I used the above expression But I am getting unwanted strings for example
I am getting output like -------25-------
-------------------------WQ------
Is I am applying anything wrong please correct me
Thanks,
Chinnu
HI chinnu
Could you please share a sample, atleast with the unwanted strings.
Regards
Pratyush
Please use it as
Load FieldA, FieldB, FieldC, FieldA & FieldB & FieldC as ComboField
Regards
Pratyush
you can use Purgechar function to remove unwanted strings But do you have a '-' for blank values of the Field.
PurgeChar(FieldA & FieldB & FieldC,'-') as CombField
Try use it
LOAD
[Field A]&''&[Field B]&''&[Field C] AS [Result Field]
Hi,
Use this.
tab:
LOAD * INLINE [
F1, F2, F3
a, f, k
b, g, l
c, h, m
d, i, n
e, j, o
];
load F2 as F1 Resident tab;
load F3 as F1 Resident tab;
output as
F1
abcdefghijklmno