Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
bgarland
Creator III
Creator III

Query Error

We often model our queries using MS SQL Server Management Studio or, in this case, Oracle Interactive Reporting. The following query works fine in both of these tools but QlikView throws up an error (with no useful information). Can anyone tell me why QlikView is balking at this syntax?

Orders:

SQL

SELECT DISTINCT

AL8.Bill_to_Customer_Number,

AL8.Ship_to_Customer_Number,

AL11.Customer_Name,

AL8.Order_Type,

AL8.Invoice_Date,

AL8.Sales_Order_Number,

AL8.Customer_PO,

SUM ( AL8.Sales_Pounds ),

SUM ( AL8.Sales_Cases ),

SUM ( AL8.Product_Price_Extended ),

AL13.OA_Number

FROM

dbo.Customer_Master AL11,

dbo.Monthly_Calendar AL12,

dbo.Sales_Detail AL8 LEFT OUTER JOIN dbo.IOS_Sales_Order AL13 ON (AL8.Sales_Order_Number=AL13.Sales_Order_Number AND AL8.Customer_PO=AL13.Customer_PO AND AL8.Order_Type=AL13.Order_Type)

WHERE (AL8.Ship_to_Customer_Number=AL11.Customer_Number

AND AL8.Fiscal_Period_Date=AL12.Fiscal_Period_Date) 

AND ((AL12.Fiscal_Period_Relative>=-6

AND AL8.Bill_to_Customer_Number IN (760, 773, 774, 797)))

GROUP BY AL8.Bill_to_Customer_Number, AL8.Ship_to_Customer_Number, AL11.Customer_Name, AL8.Order_Type, AL8.Invoice_Date, AL8.Sales_Order_Number, AL8.Customer_PO, AL13.OA_Number

;

1 Solution

Accepted Solutions
Not applicable

Did you try aliasing the column names for with group functions?

SUM ( AL8.Sales_Pounds ) as Sales_Pounds,

SUM ( AL8.Sales_Cases ) as Sales_Cases,

SUM ( AL8.Product_Price_Extended ) as Product_Price_Extended,

Kiran.

View solution in original post

2 Replies
Not applicable

Did you try aliasing the column names for with group functions?

SUM ( AL8.Sales_Pounds ) as Sales_Pounds,

SUM ( AL8.Sales_Cases ) as Sales_Cases,

SUM ( AL8.Product_Price_Extended ) as Product_Price_Extended,

Kiran.

View solution in original post

bgarland
Creator III
Creator III
Author

That did it, thanks!