Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
soniasweety
Valued Contributor III

concatenate

Hi all,

I have two tables in the data base

table1  and table2

table1 having total weeks data  and table2 has only this week data    [All columns are same ]

so now am doing the concatenation   like below is it correct or  wrong?  

Table1:

load  id,

    WeekNumber,

----

FROM .dbo."Master.table1"

where WeekNumber>=$(vMaxWeek);

concatenate(tabl1)

Table2:

load id,

WeekNumber

---

FROM .dbo."Master.table2";

Store Table1 into [lib://QVD_DATA/MainTable.qvd];

Drop Table Table1;

Tags (3)
4 Replies

Re: concatenate

Correct one only, Can you explain how you declare the vMaxWeek and which table field you used?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
soniasweety
Valued Contributor III

Re: concatenate

variable is below

and field used is table1

let vMaxWeek= Num(Peek('MaxWeek',0,'MaxWeek'))-1;

Re: concatenate

Yes approach is correct one only

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: concatenate

Try this in where one of this check which is worked for you

where WeekNumber >= $(vMaxWeek);

Or

where WeekNumber >= '$(vMaxWeek)';

Table1:

load  id,

    WeekNumber,

----

FROM .dbo."Master.table1"

where WeekNumber >= $(vMaxWeek);

//Here you use wrong table name concatenation you use Concatenate(tabl1) which is wrong.

concatenate(Table1)

Table2:

load id,

WeekNumber

---

FROM .dbo."Master.table2";

Store Table1 into [lib://QVD_DATA/MainTable.qvd];

Drop Table Table1;