Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load two sets of data from sql and groups sheets

Hello everybody.

I have 2 questions.

1) I need select two sets of data from sql database but with diferents structures of fields because i need construct two reports of diferent concepts.

The table 1 have year,customer and profit and table 2   cost and customer.

How i  retrieve both data from sql in the script ??

2) Is possible in the sheet create subsheets ??? or exists any object that agrup objects it tabs ???

Thanks in advance.

1 Solution

Accepted Solutions
Not applicable
Author

1- The object container only support one object by tab.

2- You can link the qvw with SQL if you want or download the data from SQL to Excel and load data in QlikView from Excel.

In the script you can load all you data after the declaration of variables:

SET ThousandSep='.';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='$ #.##0,00;$-#.##0,00';

SET TimeFormat='hh:mm:ss TT';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff] TT';

SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';

SET DayNames='lun;mar;mié;jue;vie;sáb;dom';

HERE LOAD YOUR DATA

Luciano.-

View solution in original post

6 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Luis,

1. You can load the two tables from SQL database, but you need to find out how to link the tables properly. Based on your explanation, the first table is defined by Year and Customer, and the second table only has Customer. Don't you have Year in the second table? Correct linking of the tables is th key to correct reporting/analysis in QlikView. Perhaps you could look up some available training on QlikView scripting. Those issues are covered there.

2. The "sub-sheet" is implemented in an object called "Container". You can list several objects (charts and tables) in a Container, and their names will be presented in tabs.

cheers,

Oleg

Not applicable
Author

The issue is that two tables not are relationed between this.

I need show two reports of diferent kind of data for not create two qw reports separated.

Not applicable
Author

The recommended is create 2 qvw but if you need to put all in 1 qvw simply load 2 tables:

Table_1:

LOAD field1,

          field2,

          field3

FROM table1;

Table_2:

LOAD field4,

          field5,

          field6

FROM table2;

For the second issue, like luistarzia says, use the "container" object, it allow you put in the same object 2 or more tables, graphics.

Luciano.-

Not applicable
Author

Thanks but i see the container and only i put one object per tab ???

Not applicable
Author

I need select the data from tables of sql ??

In what place of scritp i include the select sentence of each table ??

Thanks

Not applicable
Author

1- The object container only support one object by tab.

2- You can link the qvw with SQL if you want or download the data from SQL to Excel and load data in QlikView from Excel.

In the script you can load all you data after the declaration of variables:

SET ThousandSep='.';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='$ #.##0,00;$-#.##0,00';

SET TimeFormat='hh:mm:ss TT';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff] TT';

SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';

SET DayNames='lun;mar;mié;jue;vie;sáb;dom';

HERE LOAD YOUR DATA

Luciano.-