Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Add a calculated column into Qlikview SQL select statement

Hello All

I am new to qlikview and in the learning phase.

I have connected to the OLE DB and was able to fetch the data using the sql query.

OLEDB CONNECT TO Server_Name

SQL SELECT SysContractID,

    "Target_Qty",

    TimePeriod,

    "Wholesaler Code"

FROM "discount_and_promotion".dbo."tbl_Contract_Details";

Store summary_tbl_contract_details into summary_tbl_contract_details.qvd (qvd);

What I want is a calculated column.

I want to sum up the "Target_Qty" grouped by SysContractID,"Wholesaler Code" & TimePeriod.

Can someone help me with the code.

Tags (1)
2 Replies
MVP
MVP

Re: Add a calculated column into Qlikview SQL select statement

OLEDB CONNECT TO Server_Name

SQL SELECT

     SysContractID,

    sum(Target_Qty),

    TimePeriod,

    "Wholesaler Code"

FROM "discount_and_promotion".dbo."tbl_Contract_Details"

group by

     SysContractID,

    TimePeriod,

    "Wholesaler Code"

;

Not applicable

Re: Add a calculated column into Qlikview SQL select statement

Thanks for your input.

I got the answer outside the forum and did this in a different way.