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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

General script error

Hi Community,

MAP_SINGLE_TAB

Mapping

Load Distinct Tracking_Num,

COUNT(DISTINCT Tracking_NUM_Key)  as NB_TRK_NUM_KEY

Resident Trace_Table1

GROUP BY Tracking_Case_NUM;

This is the error i have been facing with app.

General Script Error

Execution Failed

Execution finished.

But the app is working properly in local machine .

I have tested this app by Setting Errormode=0.. Even then i felt the same issue and getting the same prob.

Please suggest anyone on this

Thanks

Satti

Labels (4)
12 Replies
rbecher
Partner - Master III
Partner - Master III

Hi Satti,

you cannot have DISTINCT and GROUP BY together. Maybe this works (don't know your field names):

MAP_SINGLE_TAB

Mapping

Load Tracking_Num,

COUNT(DISTINCT Tracking_NUM_Key)  as NB_TRK_NUM_KEY

Resident Trace_Table1

GROUP BY Tracking_Num;

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Hi Ralf,

Distinct is working in local machine ....Hence i dont think DISTINCT is the problem.

rbecher
Partner - Master III
Partner - Master III

However, the field(s) of GROUP BY has to be in the field list or aggregation expression..

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Clever_Anjos
Support
Support

Non-grouped fields MUST exists at GROUP BY clause

MAP_SINGLE_TAB

Mapping

Load Distinct Tracking_Num,

COUNT(DISTINCT Tracking_NUM_Key)  as NB_TRK_NUM_KEY

Resident Trace_Table1

GROUP BY Tracking_Case_NUM;

should be

MAP_SINGLE_TAB

Mapping

Load Distinct Tracking_Num,

COUNT(DISTINCT Tracking_NUM_Key)  as NB_TRK_NUM_KEY

Resident Trace_Table1

GROUP BY Tracking_Case_NUM,Tracking_Num;

Not applicable
Author

OK. However i have used Errormode=0 , which means it should continue reload of app even it has an error .

then why it has thrown an error.

rbecher
Partner - Master III
Partner - Master III

But what should it do? Don't load the mapping table? Then you will have more errors later using the mapping table.. And more errors.. And so on.

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

by mistake i have given tracking_case_num in the group by clause . but in the qlikview script i have given right script

rbecher
Partner - Master III
Partner - Master III

Then post the right script here..

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Guys,

Really shocked .

I have given Mapping load distinct in a single line(the following script) . It's working now.

Mapping_shot:

Mapping Load Distinct

Tracking_Num, 

COUNT(DISTINCT Tracking_NUM_Key)  as NB_TRK_NUM_KEY 

Resident Trace_Table1 

GROUP BY Tracking_Num; 

Thanks

Satti