Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
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.
darroyo_telcomu
New Contributor III

Looping different mysql databases

Hi all,

I have a mysql table containing the names of several databases, and I want to make the same query in that databases.

So I would need something like that:

select db from mydatabases;

for( every db in mydatabases )

{

  select name from db.employees;

}

Can anyone give me an idea of how to manage with this?

Thanks in advance.

Best regards,

David.

2 Replies
MVP
MVP

Re: Looping different mysql databases

hirishv7
Honored Contributor

Re: Looping different mysql databases

Hi ,

May be like this,

Data:

1.

Connect to Server1.MyDatabase

tblTableA:

Load

SQL select tableA.*

From Server1.MyDatabase.tableA as tableA

2.

Connect to Server1.MyDatabase

tblTableB:

Load

SQL select tableB.*

From Server2.MyDatabase.tableB as tableB

You can call as resident table .By Making Joins  You required to all Tables.

HTH,

Hirish

Community Browser