Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have requirement as such:
The original column has values like:
Feild A |
---|
[33][453][233][78] |
[90][34][12] |
[10][11] |
[444][43][900] |
I want to sort this and get the final output as:
Feild A |
---|
[33][78][233][453] |
[12][34][90] |
[10][11] |
[43][444][900] |
Whats the way to do this and efficiently , as actual data is much bigger.
try like:
Load
FieldA,
'['&Concat(Num, '][', Num)&']' as Num
Group By FieldA ;
Load *,
Purgechar(SubField(FieldA, ']['),'][') as Num
Inline "
FieldA
[33][453][233][78]
[90][34][12]
[10][11]
[444][43][900]"
You could use something like this:
t0: load keepchar(subfield(FieldA, ']['), '0123456789') as FieldA from Source;
t1: noconcatenate load '[' & concat(FieldA, '][', FieldA) ']' as FieldA resident t0;
drop tables t0;
- Marcus
Thanks Marcus and Tresesco. Let me try these and get back.