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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
dthornburg
Contributor II
Contributor II

Concatenating Fields in load Script

Hi,

 

 I need to concatenate 2 fields together in a load script. Trying the following:

'soln'&"so_nbr"&'      00'&"so_line_nbr" AS soln_xudt_key

 

I need 5 spaces and 2 zeroes after the first field. The spaces and 1 zero are getting truncated after the load. The result is "soln049178 001". Desired result is "soln049178     0001". How can I accomplish this?     

 

 

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@dthornburg when you try to append spaces (using keyboard space key), it auto trims the spaces. You explicitly need to append the space character using chr() function

'soln'&"so_nbr"&Repeat(chr(160),5)&'00'&"so_line_nbr" AS soln_xudt_key

View solution in original post

1 Reply
Kushal_Chawda

@dthornburg when you try to append spaces (using keyboard space key), it auto trims the spaces. You explicitly need to append the space character using chr() function

'soln'&"so_nbr"&Repeat(chr(160),5)&'00'&"so_line_nbr" AS soln_xudt_key