Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

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;

4 Replies
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
soniasweety
Master
Master
Author

variable is below

and field used is table1

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

Anil_Babu_Samineni

Yes approach is correct one only

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

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;