Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mwscott1
Creator
Creator

Concatenate in load

I hope I am asking this correctly...

I have a SQL select statement and I have been able to use substr to narrow down my field to the 6 numbers I need AGT_6 (123456). now i need to add CL in front so AGT_6 (CL123456)

Hierarchy:

SQL SELECT substr(AGT_CD,3,6) as AGT_6

FROM ZDBA.ZAHRMAGC;

1 Solution

Accepted Solutions
Not applicable

I believe in SQL concatenate function is ||

So it would be like

SQL SELECT 'CL' || substr(AGT_CD,3,6) as AGT_6

FROM ZDBA.ZAHRMAGC;

or

you can do a preceding load

Load 'CL' & AGT_6 as  AGT_6;

SQL SELECT substr(AGT_CD,3,6) as AGT_6

FROM ZDBA.ZAHRMAGC;

View solution in original post

2 Replies
Not applicable

(updated)

Try:

SQL SELECT 'CL' + substr(AGT_CD,3,6) as AGT_6

FROM ZDBA.ZAHRMAGC;

Not applicable

I believe in SQL concatenate function is ||

So it would be like

SQL SELECT 'CL' || substr(AGT_CD,3,6) as AGT_6

FROM ZDBA.ZAHRMAGC;

or

you can do a preceding load

Load 'CL' & AGT_6 as  AGT_6;

SQL SELECT substr(AGT_CD,3,6) as AGT_6

FROM ZDBA.ZAHRMAGC;