3
Answers

Location not to be displayed if 0 in all columns

Ramco Ramco

Ramco Ramco

2d
53
1

Hi

  I have below code and i want  if Location has 0 value in all six columns then it should not be displayed.

Select T0."Location,
(Select Sum(A1."LineTotal") from OPCH A0 inner join PCH1 A1 on A0."DocEntry" = A1."DocEntry"
inner join Oitm A2 on A1."ItemCode" = A2."ItemCode" and A0."CANCELED" not in ('Y','C') and A2."U_A_M" = 'EVE_EXP' and A0."BPLId" = T0."BPLId" and A0."DocDate" >= FromDate and A0."DocDate"<= ToDate) As "Accounts",
(Select Sum(A1."LineTotal") from OPCH A0 inner join PCH1 A1 on A0."DocEntry" = A1."DocEntry"
inner join Oitm A2 on A1."ItemCode" = A2."ItemCode" and A0."CANCELED" not in ('Y','C') and A2."U_A_M" = 'PR_MKT' and A0."BPLId" = T0."BPLId" and A0."DocDate" >= FromDate and A0."DocDate"<= ToDate) As "Sale",
from OBPL T0 

Thanks

Answers (3)