Hi,
I need to multiply the existing column with a calculated column. Please help me know how to do it.
(select DMM_Name, Store_Number, Location,Distbn_Date, Sum(CAST(['+@StoreNumber+'] as Numeric)) TQty, PJ_Item_M.SellingPrice,Sum(TQty*SellinpPrice) as Total_T,''CY'' flg from PJ_Location_M, PJ_Matrix_RowDstbn_T, PJ_Item_M where PJ_Item_M.ItemNumber = PJ_Matrix_RowDstbn_T.ItemNumber and PJ_Item_M.Variation = PJ_Matrix_RowDstbn_T.Variation
The line
Sum(TQty*SellinpPrice) as Total_T
gives an error: "TQty" Column does not exist