Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Can't get around understanding different types of load

What is the difference between following types of load

TableName1:

Load a,b,c;

SQL select * from ViewTable1;

-------------------------------------------------------------------------------------------------------------------------------------------------------

TableName2:

a,b,c,d;

SQL select * from ViewTable2;

Concatenate(table1)

Load distinct

a,b,c,d,e,f

Resident Table2;

I have a report and I am not able to understand these load statements. I went through the documentation and it hasnt helped much.

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Can't get around understanding different types of load

Hi,

Please find explanation below

TableName1:

Load a,b,c;                                 -- This is called a precedent load, even you have n number of fields in table you are                                                          loading only columns a, b, c; 

SQL select * from ViewTable1;     -- Loads all columns in ViewTable1;

The above statement can also be achieved like this

TableName1:

SQL select a, b, c from ViewTable1;  


-- Note: Never use * in Select Query, because loading all fields in the table which are not used in the dashboard will raise to performance issues also the loading time is more.

-------------------------------------------------------------------------------------------------------------------------------------------------------

TableName2:

Load               -- I think missed Load Keyword

a,b,c,d;          -- This is called a precedent load, even you have n number of fields in table you are                                                          loading only columns a, b, c, d;

SQL select * from ViewTable2;

Concatenate(TableName1)     -- Merges TableName2 into TableName1

Load distinct                             -- Distinct will suppress duplicate values

a,b,c,d                                   -- Fields e and f should not be here because it is not defined in above Load statement.

Resident TableName2;

Hope this helps you.

Regards,

Jagan.

6 Replies
Employee
Employee

Re: Can't get around understanding different types of load

I´m assuming that

Concatenate(table1) is Concatenate(TableName1), please let me know if I´m wrong...


TableName1:

Load a,b,c;

SQL select * from ViewTable1;

// will create one table with 3 fields called TableName1

TableName2:

LOAD a,b,c,d;

SQL select * from ViewTable2;

// Will create another table with 4 fields called TableName2

Concatenate(TableName1)

Load distinct

a,b,c,d,e,f

Resident Table2;

//Will append to TableName1, adding more rows and 3 more fields

MVP
MVP

Re: Can't get around understanding different types of load

Hi,

Please find explanation below

TableName1:

Load a,b,c;                                 -- This is called a precedent load, even you have n number of fields in table you are                                                          loading only columns a, b, c; 

SQL select * from ViewTable1;     -- Loads all columns in ViewTable1;

The above statement can also be achieved like this

TableName1:

SQL select a, b, c from ViewTable1;  


-- Note: Never use * in Select Query, because loading all fields in the table which are not used in the dashboard will raise to performance issues also the loading time is more.

-------------------------------------------------------------------------------------------------------------------------------------------------------

TableName2:

Load               -- I think missed Load Keyword

a,b,c,d;          -- This is called a precedent load, even you have n number of fields in table you are                                                          loading only columns a, b, c, d;

SQL select * from ViewTable2;

Concatenate(TableName1)     -- Merges TableName2 into TableName1

Load distinct                             -- Distinct will suppress duplicate values

a,b,c,d                                   -- Fields e and f should not be here because it is not defined in above Load statement.

Resident TableName2;

Hope this helps you.

Regards,

Jagan.

Not applicable

Re: Can't get around understanding different types of load

Thanks Clever!

After reading Jagan's answer and yours I am a little confused.

You said, concatenate from my query will append rows and add additional fields and Jagan said, I can't use it because I didnt specifiy those fields in the First Load for the table.

Highlighted
Employee
Employee

Re: Can't get around understanding different types of load

As Jagan said, avoid using select *, use select a,b,c (only the fields you really need)

Not applicable

Re: Can't get around understanding different types of load

Thanks Jagan. It makes a lot of sense now.

This what I understood from your explaination

TableName1:

Load a,b,c

SQL Select * from ViewTable1 will load data for fields a,b,c into table from ViewTable1?

and

TableName2:

Load

distinct a,b,c;

select * from ViewTable2;

Concatenate(TableName1)

Load

distinct

a,b,c

Resident TableName2

Will concatenate results from tableName1 and TableName2?

for eg

if I have in tablename1

a   b   c

1   2   3

and tablename2

a  b   c

4   5   6

The result will be

a  b  c

1  2   3

4   5   6

Not applicable

Re: Can't get around understanding different types of load

Hi Jagan,

Please let me know, if what I understood is what you explained!!!

Thanks