Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
KuppuswamyS
Contributor II
Contributor II

Group by

Hello All,

   I am new to QlikView.  May I get help from you guys on this issue?

   System hits  "General Script Error" when I execute below code. 

MachineUtil:
LOAD
BUDAT_POSTINGDATE as [Posting Date],
WERKS_PLANT as [%Plant],
ARBID_OBJECTID as [%Object ID],
LTXA1_CONFIRMATIONTEXT as [Confirmation Text],
ISM01_BURDENHOURS as [# Burden Hours],
ISM02_LABOURHOURS as [# Labour Hours]
FROM
$(vSourcePath)\AFRU_ORDERCONFIRMATIONS.qvd
(qvd);

LEFT JOIN
LOAD
OBJTY_OBJECTTYPE as [Object Type],
OBJID_OBJECTID as [%Object ID],
WERKS_PLANT as [%Plant],
ARBPL_WORKCENTER as [Work Center],
VERWE_WORKCENTERCATEGORY as [Work Center Category]
FROM
$(vSourcePath)\CRHD_WORKCENTERHEADER.qvd
(qvd);

LEFT JOIN
LOAD
OBJTY_OBJECTTYPE as [Object Type],
OBJID_OBJECTID as [%Object ID],
SPRAS_LANG as [Language],
KTEXT_DESC as [Description],
KTEXT_DESC_UP as [Description Up]
FROM
$(vSourcePath)\CRTX_MACHINEDESC.qvd
(qvd);

STORE MachineUtil into $(vTransformedPath)\MachineUtil.qvd (qvd);
DROP Table MachineUtil;


MachineUtilisation:
LOAD
[Posting Date],
[%Plant],
[%Object ID],
[Confirmation Text],
sum([# Burden Hours]) as [# Actual Burden Production Hours],
sum([# Labour Hours]) as [# Actual Labour Production Hours],
[Object Type],
[Work Center],
[Work Center Category],
[Language],
[Description],
[Description Up]
FROM
$(vTransformedPath)\MachineUtil.qvd (qvd)
where [Confirmation Text] > ''
Group By
[%Object ID];
STORE MachineUtilisation into $(vTransformedPath)\MachineUtilisation.qvd (qvd);
DROP Table MachineUtilisation;

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

@KuppuswamyS  You need to include all the fields in group by

MachineUtilisation:
LOAD
[Posting Date],
[%Plant],
[%Object ID],
[Confirmation Text],
sum([# Burden Hours]) as [# Actual Burden Production Hours],
sum([# Labour Hours]) as [# Actual Labour Production Hours],
[Object Type],
[Work Center],
[Work Center Category],
[Language],
[Description],
[Description Up]
FROM
$(vTransformedPath)\MachineUtil.qvd (qvd)
where [Confirmation Text] > ''
Group By
[Posting Date],
[%Plant],
[%Object ID],
[Confirmation Text],
[Object Type],
[Work Center],
[Work Center Category],
[Language],
[Description],
[Description Up];

View solution in original post

1 Reply
Kushal_Chawda

@KuppuswamyS  You need to include all the fields in group by

MachineUtilisation:
LOAD
[Posting Date],
[%Plant],
[%Object ID],
[Confirmation Text],
sum([# Burden Hours]) as [# Actual Burden Production Hours],
sum([# Labour Hours]) as [# Actual Labour Production Hours],
[Object Type],
[Work Center],
[Work Center Category],
[Language],
[Description],
[Description Up]
FROM
$(vTransformedPath)\MachineUtil.qvd (qvd)
where [Confirmation Text] > ''
Group By
[Posting Date],
[%Plant],
[%Object ID],
[Confirmation Text],
[Object Type],
[Work Center],
[Work Center Category],
[Language],
[Description],
[Description Up];