Which one is better way to use (SQL and LOAD) while extracting data from data base
Can you explain breifly difference between SQL and Load
Thanks in Advance,
If you extract data from a database over odbc or oledb you must use the SQL keyword. The sql statement is sent to the database as-is. Qlikview does not and cannot parse sql statements. For all other sources, files, resident tables and preceding loads you use the LOAD keyword. Only in a LOAD statement can Qlikview functions be used. See this blog post for information about preceding loads.
Hi Gysbert, Thank you for reply
I want to know the difference between SQL and LOAD. for instance if i extract data from datasourece thorugh this script what should be result
And through this script what should be result
Please let me know difference
The first example could be a tiny bit faster since it doesn't use a preceding load. The end result is exactly the same since the preceding load in your second example doesn't do transformations or calculations.
SQL statement pulls the dat from DB , and LOAD statement works on top of that data , and performs operations that coded in load statement and stores the results in QlikView.
The Load statement on top of select statement is used to transform the retrieved data from database, it is not mandatory to use Load statement on top of select statement. We will use when we are doing any calculations or arriving new fields like below
Capitalize(ename) AS ename_Formatted,
MonthName(date) AS MonthYear,
Week(date) AS Week;
Here we are getting Month and week using Load statements, and converting the ename to title case.
Hope this helps you.
1. Firstly SQL Statement is used to extract data from datasources and Saves into Qlikview memory. SQL SELECT Statement is executed by ODBC driver.
2. Secondly use Load to save those records in QlikView(in memory), since QlikView will work with them without being connected to the datasource.
3. The Load Saves the extracted data from any DataSource(Ex: Inline Statement, SQL SELECT, Data Bases, CSV files, SAP queries, Excel files, Etc...) into QlikView in memory.
4. LOAD is not mandatory, is highly recommendable. Actually, when you don't Use a LOAD statement, you can do an implicit load by just using SQL SELECT statement.
5. LOAD is used to transformed or convert those records in a way how do you want them to be dealt, create new fields based on those you already have in your datasource, etc. which can be used in visualisation.
Check below Links: