Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to write a qlikview load script for a sql query?

Hi all

I loaded two two excel sheets into qlikview application. i need a qlik view load script for the below sql query

please help me 


Select COUNT(*) from T1 FULL OUTER  JOIN T2 ON T1.Customer=T2. Customer WHERE T1.Customer is not NULL and T2.Customer is not NULL

Labels (1)
5 Replies
nagaiank
Specialist III
Specialist III

Try the following script.

TableName:

SQL Select COUNT(*) as CustomerCount from T1 FULL OUTER  JOIN T2 ON T1.Customer=T2. Customer WHERE T1.Customer is not NULL and T2.Customer is not NULL;

Joseph_Musekura
Support
Support

Hi,

Please check these two links. They give an understanding of  JOINs  from both QlikView and SQL perspectives. There is a slight difference with these 2 concepts.

QlikView:

http://community.qlik.com/message/166044#166044

and SQL:

http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/

Regards,

swuehl
Champion III
Champion III

You would need to connect to your database using a CONNECT statement (which you can create using the wizard on Data tab of the script editor). Take care to create a data source in your Windows administration first.

Then you can create a LOAD / SELECT statement (as shown above or using the wizard on data tab).

Not applicable
Author

Thank you Swuehl..

But i loaded those two tables through excel  ,but i need to perform that condition on excel data for that i need qv script help me..

its_anandrjs
Champion III
Champion III

By excel file you can perform the SQL logic or scripts like below script similar to the SQL script.

SQL Select COUNT(*) as CustomerCount from T1 FULL OUTER  JOIN T2 ON T1.Customer=T2. CustomerWHERE T1.Customer is not NULL and T2.Customer is not NULL;


T1:

Load *,Customer

From location where not Isnull(Customer);


Outer Join


T2:

Load *,Customer

From Location where not Isnull(Customer);


Left Join


FinalTable:

Load

Count(Customer) as CustomerCount

Resident T1;