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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
michael_maeuser
Partner Ambassador
Partner Ambassador

Sum function in script not possible

Hi, I need to deploy a sum function in my script. Does anyone have an idea why this is not working (see attached pic)? This is the error message: ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Die QLIK ProBatch300 2009R2 DE DEV.dbo.DEVEL Pro Batch 3_00 DE$Bank Account Ledger Entry.Amount (LCY)-Spalte ist in der Auswahlliste ungültig, da sie nicht in einer Aggregatfunktion und nicht in der GROUP BY-Klausel enthalten ist. (THIS MEANS: Amount (LCY) is invalid, since it is not in an an aggregate function and not in the Group by clause.)
SQL SELECT "Bank Account No_", "Posting Date", "Amount (LCY)"
FROM "QLIK ProBatch300 2009R2 DE DEV".dbo."DEVEL Pro Batch 3_00 DE$Bank Account Ledger Entry"
GROUP by "Bank Account No_", "Posting Date". Thanks in advance! Michael

1 Solution

Accepted Solutions
vijay_iitkgp
Partner - Specialist
Partner - Specialist

You are applying Group by on SQL Select . You need to do it at Load level.

Load

A,

B,

Sum(C)

Group By A,B ;

SQL Select A,B,C from........................

Hop this will Help You.

Regards

VIjay

View solution in original post

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

SQL SELECT "Bank Account No_", "Posting Date", Sum("Amount (LCY)")

FROM "QLIK ProBatch300 2009R2 DE DEV".dbo."DEVEL Pro Batch 3_00 DE$Bank Account Ledger Entry"

GROUP by "Bank Account No_", "Posting Date"

Regards,

Jagan.

vijay_iitkgp
Partner - Specialist
Partner - Specialist

You are applying Group by on SQL Select . You need to do it at Load level.

Load

A,

B,

Sum(C)

Group By A,B ;

SQL Select A,B,C from........................

Hop this will Help You.

Regards

VIjay

michael_maeuser
Partner Ambassador
Partner Ambassador
Author

Perfect! Thanks so much!