Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
roee1983
Contributor III
Contributor III

Addinf character to a field

Hi all,

i have account field which looks like this:

40001

40002

40003

is there any chance to add "_" between the numbers 1 ,2 and 3.

for example:

4000_1

4000_2

4000_3

thanks

roee

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

try this

load accountfield,

left(accountfield,4) &'_'&right(accountfield,1) as AccountNEwField

from tablename;

Try this code Two possibility available

Data:

LOAD

Left(AccountField,4)&'_'&Right(AccountField,3) as SDEW,

Left(AccountField,4)&'_'&mid(AccountField,index(AccountField,'0')+3,3)as Show1, * Inline [

AccountField

40001

40002

40003

40004

40005

40006

40007

40008

40009

400010

400011

4000123

];


View solution in original post

3 Replies
Not applicable

left(account field,4) & '_' & right(account field,1) as newfield

er_mohit
Master II
Master II

try this

load accountfield,

left(accountfield,4) &'_'&right(accountfield,1) as AccountNEwField

from tablename;

Try this code Two possibility available

Data:

LOAD

Left(AccountField,4)&'_'&Right(AccountField,3) as SDEW,

Left(AccountField,4)&'_'&mid(AccountField,index(AccountField,'0')+3,3)as Show1, * Inline [

AccountField

40001

40002

40003

40004

40005

40006

40007

40008

40009

400010

400011

4000123

];


Not applicable

in text objec try this--

=left('40001',4)&'_'&right('40001',1)