Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Load data from multiple table which is having common fields

Hi all,

I'm facing one challenging problem while making data model.

the scenario is...

In our database, PLC system will store all the parameters of machine as one table for every day.

ie one new table will be created on 01/04/2016 as MAC_PARAM_010416,similarly for each day system will create one new table as MAC_PARAM_(DATE).

Now i needs to load the data from these table in to qvd on daily basis , with the simple script.

Hope you guys can give ideas.

Thanks and regards,

Murugesan.

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

use like  below

Let vToday=Date(today-1,'DDMMYY'

MAC_PARAM_$(vToday):

Load * From MAC_PARAM_$(vToday);


Store MAC_PARAM_$(vToday) into MAC_PARAM_$(vToday).qvd;

Drop table MAC_PARAM_$(vToday)

View solution in original post

8 Replies
Highlighted
Partner
Partner

use like  below

Let vToday=Date(today-1,'DDMMYY'

MAC_PARAM_$(vToday):

Load * From MAC_PARAM_$(vToday);


Store MAC_PARAM_$(vToday) into MAC_PARAM_$(vToday).qvd;

Drop table MAC_PARAM_$(vToday)

View solution in original post

Highlighted
MVP
MVP

read and store in qvd 1 year of files in loop

FOR i=0 to -365 step -1

  LET vDate = Date(Today() +i, 'DDMMYY');

  trace $(vDate);

  // change with your file name

  SourceTable:

  load * from .......;                                                  // use vDate variable

  store * from SourceTable into .......qvd (qvd);      //  "

NEXT

read all your 2016 files with wildcard (* ?)

LOAD *  from MAC_PARAM_????16.csv;

Highlighted
Partner
Partner

Hi Massimo,

thanks ..it is working fine.

I have one more scenario like this..hope u can give some idea

there are few tables are newly generated in each day with some predefined prefix in my database.

ie, new tables are created in the name of "AVAIL_XXXXX"

in that XXXXX may be any in name..

in our previous scenario we have date filed in the tablename to filter our tables.

but in this current scenario, how can i identify which are all the tables are not loaded to my qvd??

thank you.

Highlighted
Partner
Partner

try like below ,may be help to you

AVAIL:

Load * From AVAIL_*;


Store AVAIL into AVAIL.qvd;

Drop table AVAIL

Highlighted
Partner
Partner

it is working fine, but on the next day i should only load which are all the tables are not loaded in the previous day, how can i identify those tables from database?

is there any option to check with directory??

thank you

Highlighted
Partner
Partner

Yes. is possible .

Let me know what is your type (excel,notepad,xml)?

Highlighted

please close your thread if your initial question is answered:

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco

Highlighted
Creator
Creator

Hello Marco Great job really very helpful.

Can u just check this and see if you can help me out ! Badly needs support.

Compare with Old Data