Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Load Multiple Tables With the Same Fields

Hello,

I am new to QlikView, and I am having difficulties loading tables using Edit Script.

I am using some tables (.xls) with Census data.  There are 5 tables in all (AllRaces, WhiteAlone, BlackAlone, etc), and 5 .xls files.  The tables have the same fields (columns).  When I 'Reload', only the AllRaces table is loaded.

AllRaces << allRaces$ 105 Lines fetched

AllRaces << whiteAlone$ 210 Lines fetched

AllRaces << blackAlone$ 315 Lines fetched

AllRaces << asianAlone$ 420 Lines fetched

AllRaces << hispanicAlone$ 525 Lines fetched

Script looks like this:

AllRaces:

LOAD Characteristic,

     Total,

     [Under $5,000],

     [$5,000 to  $9,999],

     [$10,000 to $14,999],

     [$15,000 to $19,999],

     [$20,000 to $24,999],

     [$25,000 to $29,999],

     [$30,000 to $34,999],

     [$35,000 to $39,999],

     [$40,000 to $44,999],

     [$45,000 to $49,999],

     [$50,000 to $54,999],

     [$55,000 to $59,999],

     [$60,000 to $64,999],

     [$65,000 to $69,999],

     [$70,000 to $74,999],

     [$75,000 to $79,999],

     [$80,000 to $84,999],

     [$85,000 to $89,999],

     [$90,000 to $94,999],

     [$95,000 to $99,999],

     [$100,000 to $104,999],

     [$105,000 to $109,999],

     [$110,000 to $114,999],

     [$115,000 to $119,999],

     [$120,000 to $124,999],

     [$125,000 to $129,999],

     [$130,000 to $134,999],

     [$135,000 to $139,999],

     [$140,000 to $144,999],

     [$145,000 to $149,999],

     [$150,000 to $154,999],

     [$155,000 to $159,999],

     [$160,000 to $164,999],

     [$165,000 to $169,999],

     [$170,000 to $174,999],

     [$175,000 to $179,999],

     [$180,000 to $184,999],

     [$185,000 to $189,999],

     [$190,000 to $194,999],

     [$195,000 to $199,999],

     [$200,000 and over],

     [Median income],

     F45,

     [Mean income],

     F47,

     [Gini ratio],

     F49,

     [Income per household member],

     F51

FROM

DataSet\allRaces.xls

(biff, embedded labels, table is allRaces$);

WhiteAlone:

LOAD Characteristic,

     Total,

     [Under $5,000],

     [$5,000 to  $9,999],

     [$10,000 to $14,999],

     [$15,000 to $19,999],

     [$20,000 to $24,999],

     [$25,000 to $29,999],

     [$30,000 to $34,999],

     [$35,000 to $39,999],

     [$40,000 to $44,999],

     [$45,000 to $49,999],

     [$50,000 to $54,999],

     [$55,000 to $59,999],

     [$60,000 to $64,999],

     [$65,000 to $69,999],

     [$70,000 to $74,999],

     [$75,000 to $79,999],

     [$80,000 to $84,999],

     [$85,000 to $89,999],

     [$90,000 to $94,999],

     [$95,000 to $99,999],

     [$100,000 to $104,999],

     [$105,000 to $109,999],

     [$110,000 to $114,999],

     [$115,000 to $119,999],

     [$120,000 to $124,999],

     [$125,000 to $129,999],

     [$130,000 to $134,999],

     [$135,000 to $139,999],

     [$140,000 to $144,999],

     [$145,000 to $149,999],

     [$150,000 to $154,999],

     [$155,000 to $159,999],

     [$160,000 to $164,999],

     [$165,000 to $169,999],

     [$170,000 to $174,999],

     [$175,000 to $179,999],

     [$180,000 to $184,999],

     [$185,000 to $189,999],

     [$190,000 to $194,999],

     [$195,000 to $199,999],

     [$200,000 and over],

     [Median income],

     F45,

     [Mean income],

     F47,

     [Gini ratio],

     F49,

     [Income per household member],

     F51

FROM

DataSet\whiteAlone.xls

(biff, embedded labels, table is whiteAlone$);

...

Any and all help would be greatly appreciated.

KC

1 Solution

Accepted Solutions
Nicole-Smith

Because all of the fields are the same in all of the tables, QlikView automatically concatenates (unions) them into one single table.  If you would like to keep them separate, put "NOCONCATENATE" before the LOAD (example below), or you can rename at least one of the fields so that all of the fields are not the same in all of the tables.

Example:

AllRaces:

LOAD Characteristic,

     Total,

     [Under $5,000],

     [$5,000 to  $9,999],

     [$10,000 to $14,999],

     [$15,000 to $19,999],

     [$20,000 to $24,999],

     [$25,000 to $29,999],

     [$30,000 to $34,999],

     [$35,000 to $39,999],

     [$40,000 to $44,999],

     [$45,000 to $49,999],

     [$50,000 to $54,999],

     [$55,000 to $59,999],

     [$60,000 to $64,999],

     [$65,000 to $69,999],

     [$70,000 to $74,999],

     [$75,000 to $79,999],

     [$80,000 to $84,999],

     [$85,000 to $89,999],

     [$90,000 to $94,999],

     [$95,000 to $99,999],

     [$100,000 to $104,999],

     [$105,000 to $109,999],

     [$110,000 to $114,999],

     [$115,000 to $119,999],

     [$120,000 to $124,999],

     [$125,000 to $129,999],

     [$130,000 to $134,999],

     [$135,000 to $139,999],

     [$140,000 to $144,999],

     [$145,000 to $149,999],

     [$150,000 to $154,999],

     [$155,000 to $159,999],

     [$160,000 to $164,999],

     [$165,000 to $169,999],

     [$170,000 to $174,999],

     [$175,000 to $179,999],

     [$180,000 to $184,999],

     [$185,000 to $189,999],

     [$190,000 to $194,999],

     [$195,000 to $199,999],

     [$200,000 and over],

     [Median income],

     F45,

     [Mean income],

     F47,

     [Gini ratio],

     F49,

     [Income per household member],

     F51

FROM

DataSet\allRaces.xls

(biff, embedded labels, table is allRaces$);

WhiteAlone:

NOCONCATENATE LOAD Characteristic,

     Total,

     [Under $5,000],

     [$5,000 to  $9,999],

     [$10,000 to $14,999],

     [$15,000 to $19,999],

     [$20,000 to $24,999],

     [$25,000 to $29,999],

     [$30,000 to $34,999],

     [$35,000 to $39,999],

     [$40,000 to $44,999],

     [$45,000 to $49,999],

     [$50,000 to $54,999],

     [$55,000 to $59,999],

     [$60,000 to $64,999],

     [$65,000 to $69,999],

     [$70,000 to $74,999],

     [$75,000 to $79,999],

     [$80,000 to $84,999],

     [$85,000 to $89,999],

     [$90,000 to $94,999],

     [$95,000 to $99,999],

     [$100,000 to $104,999],

     [$105,000 to $109,999],

     [$110,000 to $114,999],

     [$115,000 to $119,999],

     [$120,000 to $124,999],

     [$125,000 to $129,999],

     [$130,000 to $134,999],

     [$135,000 to $139,999],

     [$140,000 to $144,999],

     [$145,000 to $149,999],

     [$150,000 to $154,999],

     [$155,000 to $159,999],

     [$160,000 to $164,999],

     [$165,000 to $169,999],

     [$170,000 to $174,999],

     [$175,000 to $179,999],

     [$180,000 to $184,999],

     [$185,000 to $189,999],

     [$190,000 to $194,999],

     [$195,000 to $199,999],

     [$200,000 and over],

     [Median income],

     F45,

     [Mean income],

     F47,

     [Gini ratio],

     F49,

     [Income per household member],

     F51

FROM

DataSet\whiteAlone.xls

(biff, embedded labels, table is whiteAlone$);

View solution in original post

5 Replies
Nicole-Smith

Because all of the fields are the same in all of the tables, QlikView automatically concatenates (unions) them into one single table.  If you would like to keep them separate, put "NOCONCATENATE" before the LOAD (example below), or you can rename at least one of the fields so that all of the fields are not the same in all of the tables.

Example:

AllRaces:

LOAD Characteristic,

     Total,

     [Under $5,000],

     [$5,000 to  $9,999],

     [$10,000 to $14,999],

     [$15,000 to $19,999],

     [$20,000 to $24,999],

     [$25,000 to $29,999],

     [$30,000 to $34,999],

     [$35,000 to $39,999],

     [$40,000 to $44,999],

     [$45,000 to $49,999],

     [$50,000 to $54,999],

     [$55,000 to $59,999],

     [$60,000 to $64,999],

     [$65,000 to $69,999],

     [$70,000 to $74,999],

     [$75,000 to $79,999],

     [$80,000 to $84,999],

     [$85,000 to $89,999],

     [$90,000 to $94,999],

     [$95,000 to $99,999],

     [$100,000 to $104,999],

     [$105,000 to $109,999],

     [$110,000 to $114,999],

     [$115,000 to $119,999],

     [$120,000 to $124,999],

     [$125,000 to $129,999],

     [$130,000 to $134,999],

     [$135,000 to $139,999],

     [$140,000 to $144,999],

     [$145,000 to $149,999],

     [$150,000 to $154,999],

     [$155,000 to $159,999],

     [$160,000 to $164,999],

     [$165,000 to $169,999],

     [$170,000 to $174,999],

     [$175,000 to $179,999],

     [$180,000 to $184,999],

     [$185,000 to $189,999],

     [$190,000 to $194,999],

     [$195,000 to $199,999],

     [$200,000 and over],

     [Median income],

     F45,

     [Mean income],

     F47,

     [Gini ratio],

     F49,

     [Income per household member],

     F51

FROM

DataSet\allRaces.xls

(biff, embedded labels, table is allRaces$);

WhiteAlone:

NOCONCATENATE LOAD Characteristic,

     Total,

     [Under $5,000],

     [$5,000 to  $9,999],

     [$10,000 to $14,999],

     [$15,000 to $19,999],

     [$20,000 to $24,999],

     [$25,000 to $29,999],

     [$30,000 to $34,999],

     [$35,000 to $39,999],

     [$40,000 to $44,999],

     [$45,000 to $49,999],

     [$50,000 to $54,999],

     [$55,000 to $59,999],

     [$60,000 to $64,999],

     [$65,000 to $69,999],

     [$70,000 to $74,999],

     [$75,000 to $79,999],

     [$80,000 to $84,999],

     [$85,000 to $89,999],

     [$90,000 to $94,999],

     [$95,000 to $99,999],

     [$100,000 to $104,999],

     [$105,000 to $109,999],

     [$110,000 to $114,999],

     [$115,000 to $119,999],

     [$120,000 to $124,999],

     [$125,000 to $129,999],

     [$130,000 to $134,999],

     [$135,000 to $139,999],

     [$140,000 to $144,999],

     [$145,000 to $149,999],

     [$150,000 to $154,999],

     [$155,000 to $159,999],

     [$160,000 to $164,999],

     [$165,000 to $169,999],

     [$170,000 to $174,999],

     [$175,000 to $179,999],

     [$180,000 to $184,999],

     [$185,000 to $189,999],

     [$190,000 to $194,999],

     [$195,000 to $199,999],

     [$200,000 and over],

     [Median income],

     F45,

     [Mean income],

     F47,

     [Gini ratio],

     F49,

     [Income per household member],

     F51

FROM

DataSet\whiteAlone.xls

(biff, embedded labels, table is whiteAlone$);

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Leave the first LOAD as-is, and add the prefix NOCONCATENATE to all succeeding LOAD statements. You'll end up with five separate internal tables.

Best,

Peter

Not applicable
Author

Thank you very much Peter!  It worked!

Not applicable
Author

Thank you so much Nicole!  It worked!

Not applicable
Author

So sorry, but I was not able to mark 2 'Correct Answers'.