Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

field concatenation

hi
my input is look like
columnA columnB
2009 1
2009 2
2009 3
2009 4
2009 5
2009 6
2009 7
2009 8
2009 9
2009 10
2009 11
2009 12
i need out put like this
outcolumn
200901
200902
200903
200904
200905
200906
200907
200908
200909
200910
200911
200912
how can define by using components?

note:dont forgot about "0" after year.
i hope can help any one....
Thanking u.......
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hello
Concatenate the two columns on tMap, eg:
row1.columnB.length()>1?row1.columnA+row1.columnB:row1.columnA+"0"+row1.columnB
Best regards

shong
Anonymous
Not applicable
Author

HI.i ma getting error like this.can i know,how we can solve?
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method length() is undefined for the type Integer

Thanking u....
Anonymous
Not applicable
Author

Hello
The method length() is undefined for the type Integer

In my case, I assuming both the type of columnA and columnB are string. The method length() is for type string, you need convert Integer to string first.
String.valueOf(row1.columnB.length())>1?row1.columnA+row1.columnB:row1.columnA+"0"+row1.columnB

Best regards
shong