Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Having Criteria

$
0
0

Hi,

I have a Having function in my SQL code but need to change it slightly but not too sure how. 

Currently it looks at all values that are different to 0. However, some values are a minus and some are positive. I need my report to show values that is different from 0.50 (regardless if minus or positive)


having  cast((dbo.kpi.total_contract - dbo.kpi.invoiced_total) - sum(dbo.draft_and_deferred_invoices.Total_Net_and_Def) as decimal(10,2)) <>0


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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