Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
Employee

MYSQL Usage of Variable to Loop through 10 databases

We are using MYSQL as the data source.  We have the same 4 tables replicated for 10 different databases (one database for each one of 10 locations). 

We'd like to concatenate all 10 versions of the 4 tables into 4 tables in QlikView and add the database name (database1 through database10) as a new field appended to the records in the data (ie database# as locationid). 

Is it possible to loop through all 10 databases within a single script sequence without having to script and manually refer to each database individually and concatenate into the same set of 4 tables in QlikView?

Julie Kae
1 Reply
Highlighted
MVP & Luminary
MVP & Luminary

Yes, it's fairly easy. Take a look at the FOR EACH statement.

-Rob