Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

bilionut
Not applicable

loading data

Hi everybody,

I am very, very new in Qlik also in programming so please heave mercy :-)

I have two table

table1:

val1, dep

12 , aa    

123, aa

223, bb

233, cc

table2:

dep, val2, val3

aa,   122,  3939     

bb,   124,  3439

cc,   123,  wee9

ee,   344,  3ejej

xx,   556,  3lkm

I need to load data from table2 only if val1=xxx

Thanks a lot

Tags (2)
1 Solution

Accepted Solutions
adurquety
Not applicable

loading data

Hi guy,

When you create your table 4, you give the same name for the column than table 2. Qlikview will automatically join table 2 et table 4 because of that.

you have to understand how QlikView store data in its model. Each time that you have 2 table with exactly the same column names then QlikView will automatically aggregate data and he will create only one table.

i think that there is a command like noconcatenate if you want to see your table 4, try this :

Tab4:

noconcatenate Load

dep,

val2,

val3

resident Tab3 where val1_new=123;

8 Replies
SunilChauhan
Not applicable

loading data

i am not understand clearly but u can try it

table1:

load * inline [

val1, dep

12 , aa    

123, aa

223, bb

233, cc

];

table2:

load * inline [

dep, val2, val3

aa,   122,  3939     

bb,   124,  3439

cc,   123,  wee9

ee,   344,  3ejej

xx,   556,  3lkm

];

Load

dep, val2, val3

resisent tabe2 where dep='XX';

drop table table2;

bilionut
Not applicable

loading data

i want to put condition for field "val1" from table1

SunilChauhan
Not applicable

loading data

but there is no item like xxx in var1

bilionut
Not applicable

loading data

sorry, you have right

condition is something like this: val1=223

SunilChauhan
Not applicable

loading data

table1:

load * inline [

val1, dep

12 , aa    

123, aa

223, bb

233, cc

];

table2:

load * inline [

dep, val2, val3

aa,   122,  3939     

bb,   124,  3439

cc,   123,  wee9

ee,   344,  3ejej

xx,   556,  3lkm

];

Tab3:

Load

dep,

val1 as val1_new

resident table1;

left join

Load

dep,

val2, val3

resisent tabe2 ;

Tab4:

Load

dep,

val2, val3

resident Tab3 where val1_new=123;

drop tables table2, Tab3;

bilionut
Not applicable

loading data

i run this:

table1:

load * inline [

val1, dep

12 , aa 

123, aa

223, bb

233, cc

];

table2:

load * inline [

dep, val2, val3

aa,   122,  3939    

bb,   124,  3439

cc,   123,  wee9

ee,   344,  3ejej

xx,   556,  3lkm

];

Tab3:

Load

dep,

val1 as val1_new

resident table1;

left join

Load

dep,

val2, val3

resident table2 ;

Tab4:

Load

dep,

val2, val3

resident Tab3 where val1_new=123;

drop tables table2, Tab3;

but the result is only table1. If i comment drop tables i dont see tab4

adurquety
Not applicable

loading data

Hi guy,

When you create your table 4, you give the same name for the column than table 2. Qlikview will automatically join table 2 et table 4 because of that.

you have to understand how QlikView store data in its model. Each time that you have 2 table with exactly the same column names then QlikView will automatically aggregate data and he will create only one table.

i think that there is a command like noconcatenate if you want to see your table 4, try this :

Tab4:

noconcatenate Load

dep,

val2,

val3

resident Tab3 where val1_new=123;

bilionut
Not applicable

loading data

Thanks, it works.