Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

'Real' computed column in view is returning 0.00 for every record

$
0
0

I'm pretty sure this is a problem with what I'm returning.  Just not sure how to do this:

ProjCostTransCost projcostTransCost;
TransactionID transId;

transId = SysComputedColumn::returnField(tableStr(ProjCostTransView), identifierStr(ProjCostTrans), fieldStr(ProjCostTrans, TransId));

select sum(CostAmountLedger) from projCostTransCost
where projCostTransCost.TransId == transId;

return num2str(projcostTransCost.costAmountLedger, 0, 2, DecimalSeparator::Dot, ThousandSeparator::Comma);

In SSMS, I can see the t-sql from my view for this field as:

(CAST ((0.00) AS NVARCHAR(15))) AS TOTALCOSTAMOUNTACTUAL  (Amongst the other field selections)

This would explain why I see all 0.00.


Viewing all articles
Browse latest Browse all 17532

Trending Articles



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