Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

zied_ahmed1
Contributor III

convert sql transaction to script code qlik sense

Hello i need to calculate ratio between :

Number of cars in sql is :


SELECT * FROM table WHERE Type= 'car' and date='2017' (i need this in script as Number_cars)

Number actif cars in sql is :

SELECT DISTINCT (Machine) FROM table WHERE Type= 'car' and date='2017' ( I need this in script as Active_cars)

Thanks for help

3 Replies
MVP
MVP

Re: convert sql transaction to script code qlik sense

ODBC CONNECT ....

or

OLEDB CONNECT ....


Number_cars:

SQL SELECT * FROM table WHERE Type= 'car' and date='2017';

Active_cars:

LOAD Machine as Active_cars;

SQL SELECT DISTINCT Machine FROM table WHERE Type= 'car' and date='2017';

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
zied_ahmed1
Contributor III

Re: convert sql transaction to script code qlik sense

Hello Jonathan,

I already loaded previously these fields  : Type and date and Machine to do some works,

no i need after that add script code like the two transactions

zied_ahmed1
Contributor III

Re: convert sql transaction to script code qlik sense

stalwar1‌ any suggestions please?

Community Browser