Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Union all tables from .MDB file?

Hello,

I have a MDB (access) file.
In this file i have multiple tables with the same structure (same fields).


I want to Load in QlikView all my talbes in a same table.

Is it possible?

I arrived to connect my MDB and launch SQL query but just on one table.

Thank you

6 Replies
cgdonders
Partner - Creator
Partner - Creator

Hi,

You can use the concatenate load functionality in your script.

If the columns are identical in each MDB table, QlikView will attempt to concatenate them by default if they are loaded in sequence.

Otherwise, name your first table, such as Tablename: then preface the following loads of other files with CONCATENATE (TableName)

Example:

TableName:

LOAD Col1, Col2

from [file.qvd];

CONCATENATE (TableName)

LOAD Col1, Col2

from [file2.qvd];

cgdonders
Partner - Creator
Partner - Creator

its_anandrjs
Champion III
Champion III

Hi,

Concatenate all tables and apply a flag field like

Example:

 

Table1:

LOAD ColA, ColB, ColC, 'Table1' as TableFlag

from YourLocation;

CONCATENATE (Table1)

LOAD ColA, ColB, ColC, 'Table2' as TableFlag

from YourLocation;

Like other tables

Thanks & Regards

Not applicable
Author


I've tried this code :

 

ODBC CONNECT32 TO [MS Access Database;DBQ=D:\BDD\test.mdb];

TableName:
LOAD NUMBER
from ;

I have an error : Field not fount -<NUMBER>

Where is my error?

Not applicable
Author

Ok,thank for your help, but the number of table is dynamic.
So today i have 20 tables but tomorow it could be 25 tables.

Is it possible to adapt your exemple ?

maxgro
MVP
MVP

you have to loop on tables, something as (I read only one table, adapt to your requirements)

T:

sqltables;

Let RCount = NoOfRows('T');

trace rows=$(RCount);

For i=0 to $(RCount) -1

let x =  peek('TABLE_NAME',$(i), 'T');

trace table=$(x);

  if '$(x)'='Origin Airports' then

  trace read;

  [$(x)]:

  LOAD *;

  SQL SELECT * FROM [$(x)];

  ENDIF;

Next i;