Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Crosstable Concatenate

I need concatenate 2nos cosstable. please help

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

If both the QVD's have same column names, then both will get concatenated automatically. Try this


PL:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

     MONTH,

     YEAR,

     MONTH2,

     CLA_CODE,

     GROSS_PREMIUM

FROM

(qvd);

PL2013:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

     MONTH,

     YEAR,

     MONTH2,

     CLA_CODE,

     GROSS_PREMIUM

FROM

(qvd);

PL:

NoConcatenate

LOAD * Resident PL2012;

Concatenate

LOAD * Resident PL2013;

DROP Table PL2012,PL2013;

View solution in original post

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

You have to reload then then you can concatenate:

if you have

TABA:

crosstable ...

TABB

crosstable:

then do:

TABC:

noconcatenate

load * resident TABA;

concatenate

load * resident TABB;

drop tables TAA, TABB;

Let me  know

anbu1984
Master III
Master III

Not applicable
Author

Thank you for quick reply for this. I have still in trouble on this regard.

Please refer my script and error massage at the time of data loading.

PL2012:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

MONTH,

YEAR,

MONTH2,

CLA_CODE,

GROSS_PREMIUM

FROM

(qvd);

PL2013:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

MONTH,

YEAR,

MONTH2,

CLA_CODE,

GROSS_PREMIUM

FROM

(qvd);

PL:

NoConcatenate

LOAD * Resident PL2012;

Concatenate

LOAD * Resident PL2013;

DROP Table PL2012;

Error massage as follows,

Table not found

Concatenate

Load * resident PL2013

anbu1984
Master III
Master III

Here you will get only one table PL2012, since concatenate happens by default.

Hence there is no table named "PL2013" and you got that error.

PL2012:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

     MONTH,

     YEAR,

     MONTH2,

     CLA_CODE,

     GROSS_PREMIUM

FROM

(qvd);

PL2013:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

     MONTH,

     YEAR,

     MONTH2,

     CLA_CODE,

     GROSS_PREMIUM

FROM

(qvd);

EDIT: You dont need this code since concatenate happens by default

NoConcatenate

LOAD * Resident PL2012;

Concatenate

LOAD * Resident PL2013;

DROP Table PL2012;

Not applicable
Author

Dear Anbu,

Thank you for reply

I create 2 table named PL2012 & PL2013 but still in same error,

anbu1984
Master III
Master III

Can you post the script you tried?

Not applicable
Author

PL2012:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

MONTH,

YEAR,

MONTH2,

CLA_CODE,

GROSS_PREMIUM

FROM

(qvd);

PL2013:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

MONTH,

YEAR,

MONTH2,

CLA_CODE,

GROSS_PREMIUM

FROM

(qvd);

PL:

NoConcatenate

LOAD * Resident PL2012;

Concatenate

LOAD * Resident PL2013;

DROP Table PL2012,PL2013;

anbu1984
Master III
Master III

If both the QVD's have same column names, then both will get concatenated automatically. Try this


PL:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

     MONTH,

     YEAR,

     MONTH2,

     CLA_CODE,

     GROSS_PREMIUM

FROM

(qvd);

PL2013:

CrossTable(DESCRIPTIONS, Data, 5)

LOAD BCOD,

     MONTH,

     YEAR,

     MONTH2,

     CLA_CODE,

     GROSS_PREMIUM

FROM

(qvd);

PL:

NoConcatenate

LOAD * Resident PL2012;

Concatenate

LOAD * Resident PL2013;

DROP Table PL2012,PL2013;