Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concat sort issue

Hi Team,

IDorderRatevalue
ID1Rusd1000
ID1Seur200

When I am trying to perform Concat(order,'/') as neworder in the edit script:

The excepted result should be R/S and usd/eur as output in the table box instead it shows R/S but eur/usd

Can you anyone help on this! As per the sort order i guess it is showing eur first instead of usd even though usd is mapped to R

I am not understanding what to put in sort weight which is an extra parameter in Concat.

Appreciate your help in advance!

Thanks,

S

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Temp:

LOAD

*,

RowNo() AS RowNum

INLINE [

ID, order, Rate, value

ID1, R, usd, 1000

ID1, S, eur, 200];

Data:

NoConcatenate

LOAD

ID,

Concat(order, '/', RowNum) AS order,

Concat(Rate, '/', RowNum) AS Rate,

Concat(value, '/', RowNum) AS value

RESIDENT Temp

GROUP BY ID;

DROP TABLE Temp;

Regards,

Jagan.

View solution in original post

5 Replies
karthikeyan1504
Creator III
Creator III

go to your table box properties-> Sort

Promote order to first and Rate in second position. (Select both sort order condition based on Text A->Z)

Not applicable
Author

The output itself is eur/usd but the expected output should be usd/eur which is never coming as the result!

chaper
Creator III
Creator III

While doing concat in edit script do the order by .Other way is you can assign concat to any number type field by using dual function in script Dual(Concat(order,'/'),Value) as ConcatFieldname.Sort the concat field by Value field in any object

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Temp:

LOAD

*,

RowNo() AS RowNum

INLINE [

ID, order, Rate, value

ID1, R, usd, 1000

ID1, S, eur, 200];

Data:

NoConcatenate

LOAD

ID,

Concat(order, '/', RowNum) AS order,

Concat(Rate, '/', RowNum) AS Rate,

Concat(value, '/', RowNum) AS value

RESIDENT Temp

GROUP BY ID;

DROP TABLE Temp;

Regards,

Jagan.

jonathandienst
Partner - Champion III
Partner - Champion III

Just use:

     Concat(order,'/', order)

     Concat(Rate, '/', order)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein