Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to load n number of tables into qlikview from sql server db

Hi All,

I have a database which contains 160 tables, i need to load all the tables and fields

How do import all the tables at a time ?

Thanks

1 Solution

Accepted Solutions
awhitfield
Partner - Champion
Partner - Champion

Hi,

Create the OBDC  / OLEDB connection to your databse in the script editor and then use the 'SELECT' option to create the load script for each table in turn as required.

HTH - Andy

View solution in original post

4 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi,

Create the OBDC  / OLEDB connection to your databse in the script editor and then use the 'SELECT' option to create the load script for each table in turn as required.

HTH - Andy

Not applicable
Author

Hey thank you .. but i need to import all tables at a time.. say i have 160 tables is there is way to load all the data

at a time?

awhitfield
Partner - Champion
Partner - Champion

No you have to specify each one n turn, just ensure that you don't load anything you don't really need!

Andy

rustyfishbones
Master II
Master II

You can load all tables at once, but you need to be careful with common field names, so you could extract all of the Data and store into qvd's but you need to use QUALIFY.

You will also need to ensure you are not extracting VIEWS or SYSTEM TABLES

Something similar to the below, it's an example of loading all tables from xtreme ms access database

ODBC CONNECT32 TO [xtreme;DBQ=C:\Users\Alan\Desktop\xtreme.mdb];

AllTables:

SQLTABLES;

DISCONNECT;

FOR i = 0 to NoOfRows('AllTables')

  LET vTable = PEEK('TABLE_NAME',$(i),'AllTables');

  QUALIFY*;

  SQL SELECT *

  FROM `$(vTable)`;

  STORE `$(vTable)` INTO `$(vTable).qvd`(qvd);

next i