Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

Append New Data

Hi Community,

I have 2 different tables, same structure in tables.

I need concatenate these tables.

One table i need to reload every day, and other table i want to reload month starting dates. (like 1, 2 dates)

Example:

// Here This table reloads every day

Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

From Category;

Concatenate

// This table i want to reload every month only first 2 days

Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

From Category_NewDate;

We are reloading manually, Every month first 2 days reloading after that we are commenting second table code.

Can we do Automatically ????

Thanks in Advance...

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I would explicitely set the timer mode to use the current date:

Example:

Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

From Category;

IF  Day( Today( 1) ) <=2 THEN

    Concatenate (Example)

    Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

    From Category_NewDate;

END IF

View solution in original post

9 Replies
sunny_talwar

Try this may be:

Example:

Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

From Category;

If Day(Today()) = 1 or Day(Today()) = 2 then

    Concatenate (Example)

    Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

    From Category_NewDate;

ENDIF;

swuehl
MVP
MVP

I would explicitely set the timer mode to use the current date:

Example:

Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

From Category;

IF  Day( Today( 1) ) <=2 THEN

    Concatenate (Example)

    Load CatID,

        CatName,

        Desc,

        UnitPrice,

        UnitCost

    From Category_NewDate;

END IF

sunny_talwar

What would be the logic behind doing that? Is that something you would recommend even when setting variables? For instance

LET vToday = Today();

vs

LET vTodat = Today(1);

paulwalker
Creator III
Creator III
Author

My requirement..

Here my 1st table standard data,

Month start first 2 days fetching new data from second data.  (Here everyday refreshing data in database, but i don't need 3rd day onwards)

I want to append these 2 tables....

swuehl
MVP
MVP

Sunny, if you want your variables to show the date of the script execution, I would recommend explicitely using timer mode 1.

There might not be a difference in using the default timer mode (2), but there were some changes and bugs in the past, and the only 'stable' function call was using timer mode 1.

Which also makes sense if you are really interested in getting the date of the function call /script execution and not in getting the date of opening the application (which apparently is most often the same date).

Tldr: I would recommend to use timer mode 1 in script function calls of today(1) / now(1), if it's only to make your choice explicite.

swuehl
MVP
MVP

Paul, have you tried what has been suggested above? Is it not working for you?

If it is not working, could you describe a bit more detailed what issues you are seeing?

sunny_talwar

That make sense.

Thanks for the explanation Stefan.

Best,

Sunny

paulwalker
Creator III
Creator III
Author

It's working.

Thank you

Anonymous
Not applicable

by using the conncetate function or

where date >max(date)