SELECT [BIDAT].[dbo].[viewTotalTurnOver].[REPTORG] as org, [BIDAT].[dbo].[viewTotalTurnOver].[REPTORG] AS code,view002Opporunities.Amount0+BIDAT.dbo.view002Opporunities.Amount10+"
+" Case when BIDAT.dbo.view002Opporunities.Amount0+BIDAT.dbo.view002Opporunities.Amount10+BIDAT.dbo.view002Opporunities.Amount50 = 0"
+ " then 0 else isnull(BIDAT.dbo.view002Opporunities.Amount0+BIDAT.dbo.view002Opporunities.Amount10+BIDAT.dbo.view002Opporunities.Amount50 , 0) end as O50,"
+ " Case when BIDAT.dbo.view002Opporunities.Amount75 = 0 then 0 else isnull([BIDAT].[dbo].view002Opporunities.Amount75 , 0) end as O75 ,"
+ " Case when BIDAT.dbo.view002Opporunities.Amount99 = 0 then 0 else isnull([BIDAT].dbo.view002Opporunities.Amount99 , 0) end as O99 ,"
+ " Case when BIDAT.dbo.view002Opporunities.Amount100 = 0 then 0 else isnull(BIDAT.dbo.view002Opporunities.Amount100 , 0) end as O100 ,"
+ " ABS(BIDAT.dbo.viewTotalTurnOver.[Total Turnover]) AS TT, "
+ " (BIDAT.dbo.viewTotalGP.[Total GP]*-1) AS TGP,"
+ " BIDAT.dbo.viewFRYeartoDate.Actual+FRY.Actual as OH ,"
+ " FRYEAR.Actual*-1 as NP,"
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR "
+ " FROM BIDAT.dbo.viewTotalTurnOver JOIN "
+ " BIDAT.dbo.viewTotalGP ON BIDAT.dbo.viewTotalTurnOver.REPTORG = BIDAT.dbo.viewTotalGP.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = BIDAT.dbo.viewTotalGP.FSCSYR JOIN"
+ " BIDAT.dbo.viewFRYeartoDate ON BIDAT.dbo.viewTotalTurnOver.REPTORG = BIDAT.dbo.viewFRYeartoDate.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = BIDAT.dbo.viewFRYeartoDate.FSCSYR AND BIDAT.dbo.viewFRYeartoDate.head ='Overhead Expenses' JOIN"
+ " BIDAT.dbo.viewFRYeartoDate as FRY ON BIDAT.dbo.viewTotalTurnOver.REPTORG = FRY.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = FRY.FSCSYR AND FRY.head ='Corporate Expenses' JOIN "
+ " BIDAT.dbo.viewFRYeartoDate as FRYEAR ON BIDAT.dbo.viewTotalTurnOver.REPTORG = FRYEAR.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = FRYEAR.FSCSYR AND FRYEAR.head ='Net Profit' "
+ " LEFT JOIN BIDAT.dbo.view002Opporunities ON "
+ " BIDAT.dbo.viewTotalTurnOver.REPTORG = BIDAT.dbo.view002Opporunities.REPTORG AND BIDAT.dbo.viewTotalTurnOver.FSCSYR = "
+ " BIDAT.dbo.view002Opporunities.FSCSYR"
+ " where BIDAT.dbo.viewTotalTurnOver.FSCSYR="+FSCSYR+ " AND(BIDAT.dbo.viewTotalTurnOver.REPTORG in('KPSDUB','QKDODT','KPSRIY','KPSJED','KPSKBR'))"
+ " order by FRYEAR.Actual