Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Dynamic Data Loading from database or source

Arjunarao
Honored Contributor II

Dynamic Data Loading from database or source

Hi All,

This script will help us to load the data dynamically from different tables by passing the parameters.

Hope this will help you. Thank you.

SET LOC1='US';

SET LOC2='IN';

SET LOC3='UK';

SET LOC4='GM';

SET LOC5='AU';

SET SCHEMA1='USDB';

SET SCHEMA2='INDB';

SET SCHEMA3='UKDB';

SET SCHEMA4='GMDB';

SET SCHEMA5='AUDB';

For i= 1 to 5

Employee_Details:

Load EMPNO ,

  '$(LOC$(i))'&EMPNO as Emp_Key,

  JOB ;

SQL SELECT *

FROM $(SCHEMA$(i)).EMP1;

Location_Details:

Load REGION,

  '$(LOC$(i))'&REGIONID as LOC_Key ;

SQL SELECT *

FROM $(SCHEMA$(i)).LOCATION;

Dept_Details:

Load DEPTNO,

  '$(LOC$(i))'&LOCID as DEPT_Key,

  DNAME;

SQL SELECT *

FROM $(SCHEMA$(i)).DEPT;

next

Attachments
Version history
Revision #:
1 of 1
Last update:
‎09-09-2015 04:03 AM
Updated by: