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: 
chinnu123
Creator
Creator

How to concatenate different fields in to one field

Hi Team,

I have one scenario, I am having different fields for example

FieldA   FieldB   FieldC

25         67         WQ

G          D           12

--           34         00

65          *          *

Now I need to concatenate the above 3 fields FieldA,FieldB and FieldC in to one new field and i need to get all three field values into new field.

Can any one tell me which function I need to use for this?

Thanks in advance

Thanks,

Chinnu.

8 Replies
prat1507
Specialist
Specialist

Use

FieldA & FieldB & FieldC as CombField

Regards

Pratyush

swuehl
MVP
MVP

You can potentially use the CROSSTABLE LOAD prefix

or just load your table three times, renaming the field to a common field name one after the other

LOAD A as Common

RESIDENT ...;

LOAD B as Common

RESIDENT ...;

LOAD C as Common

RESIDENT ...;

chinnu123
Creator
Creator
Author

Hi Pratyush,

Thanks for your quick reply, I used the above expression But I am getting unwanted strings for example

I am getting output like -------25-------

                                -------------------------WQ------

Is I am applying anything wrong please correct me

Thanks,

Chinnu

prat1507
Specialist
Specialist

HI chinnu

Could you please share a sample, atleast with the unwanted strings.

Regards
Pratyush

prat1507
Specialist
Specialist

Please use it as

Load FieldA, FieldB, FieldC, FieldA & FieldB & FieldC as ComboField

Regards

Pratyush

sudeepkm
Specialist III
Specialist III

you can use Purgechar function to remove unwanted strings But do you have a '-' for blank values of the Field.

PurgeChar(FieldA & FieldB & FieldC,'-') as CombField

Anonymous
Not applicable

Try use it

LOAD

          [Field A]&''&[Field B]&''&[Field C]     AS     [Result Field]

vinod22kv
Creator
Creator

Hi,

Use this.

tab:

LOAD * INLINE [

    F1, F2, F3

    a, f, k

    b, g, l

    c, h, m

    d, i, n

    e, j, o

];

load F2 as F1 Resident tab;

load F3 as F1 Resident tab;

output as

F1 

abcdefghijklmno