Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

SQL query convert into Qlik

Hi  All ,

 

Can anyone help me to convert attached SQL script into Qlik..

Your help will really appreciate.

Thanks

1 Solution

Accepted Solutions
bhaskar_sm
Partner - Creator III
Partner - Creator III

Hi,

have you tried debugging the query ??  below pice of a query is running ??

bhaskar_sm_0-1591205346593.png

Please use WITH .. AS

Example:  

SQL WITH app_owner AS (SELECT "ID","Owner_ID" FROM public."Apps") SELECT "Owner_ID", COUNT("ID") as "AppCount" FROM "app_owner" GROUP BY "app_owner"."Owner_ID";
 

https://help.qlik.com/en-US/connectors/Subsystems/ODBC_connector_help/Content/Connectors_ODBC/How-to...

in your query, it will be like.

SQL WITH t1  as  ( Select ...... )

kindly share the error message so that will be able to help you out.

 I hope this will help

Thanks,

Bhasker

View solution in original post

3 Replies
bhaskar_sm
Partner - Creator III
Partner - Creator III

Hi,

why do you want to convert the SQL statements in Qlik Script? you can run the SQL statements directly in qlikview

Regards,

Bhaskar 

 

prma7799
Master III
Master III
Author

Sorry for late response.

 

Actually when I am ran that query then I am getting error that invalid object t1.

 

 

Thanks

bhaskar_sm
Partner - Creator III
Partner - Creator III

Hi,

have you tried debugging the query ??  below pice of a query is running ??

bhaskar_sm_0-1591205346593.png

Please use WITH .. AS

Example:  

SQL WITH app_owner AS (SELECT "ID","Owner_ID" FROM public."Apps") SELECT "Owner_ID", COUNT("ID") as "AppCount" FROM "app_owner" GROUP BY "app_owner"."Owner_ID";
 

https://help.qlik.com/en-US/connectors/Subsystems/ODBC_connector_help/Content/Connectors_ODBC/How-to...

in your query, it will be like.

SQL WITH t1  as  ( Select ...... )

kindly share the error message so that will be able to help you out.

 I hope this will help

Thanks,

Bhasker