Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Re: SQL QUERY

$
0
0

Hi Akhillesh,

 

Find the below query and the logic missed.

 

 

 

select 'Eval_Revenue' as APPLICATION_NAME,

 

 

'On Track' AS KPI_TYPE,NULL AS KPI_VALUE, NULL as PTYPE,

 

 

(convert(decimal(15,0), (sum(NetRevenue)/1000)*0.08) -isnull(A.KPI_NUMBERS,0)) as KPI_NUMBERS,

 

 

b.customername from AlexDM.dbo.vwSVEvalMasterDashBoard B,(select

 

 

convert(decimal(15,0), sum(NetRevenue)/1000) as KPI_NUMBERS,customername from AlexDM.dbo.vwSVEvalMasterDashBoard

 

 

where EvalStatusName IN ( 'Complete') and

 

 

EvalQuarterSK between DATEADD(q, DATEDIFF(q, 0, getdate()), 0) and

 

 

DATEADD(d, -1, DATEADD(q, DATEDIFF(q, 0, getdate()) + 1, 0)) group by customername)A

 

 

where

 

 

EvalQuarterSK between DATEADD(q, DATEDIFF(q, 0, getdate()), 0) and DATEADD(d, -1, DATEADD(q, DATEDIFF(q, 0, getdate()) + 1, 0))

 

 

and A.customername = B.customername

 

 

group by B.customername,A.KPI_NUMBERS.

 

 

From the Above Query the sub query with Bold letters should be Minus with

-isnull(A.KPI_NUMBERS,0)).

 

can you help me how do we define this in BODS and implement this logic.

 

regards

Karthik


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>