Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Script to get all tables from a single database


In my database, there are 90 tables. I need all those tables into my qlikview.

Can anyone tel me how to write script with 'for each' statement ??

Thanks and regads,


2 Replies
Valued Contributor

Re: Script to get all tables from a single database

When you click the Select button, you see a DB dialogbox. Select your tables and click on add.

When you have added all, finish it.

You may want to use the file attached. The autor of the file is not me. I downloaded from this community.

Valued Contributor II

Script to get all tables from a single database

Hello Guru,

try this

CONNECT TO your database

SQLTables; //read database information
T1: load chr(39)&concat(TABLE_NAME,chr(39)&', '&chr(39))&chr(39) as tabs resident  T2 where TABLE_TYPE='TABLE';
let tabs=peek('tabs',0,'T1'); // only load tables

for each tab in $(tabs)
sql select * from $(tab);
next  //select all fields from all tables

maybe use a qualify?


Community Browser