Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Hi, Is it possable to add a calculation to an already calculated field?

$
0
0

The below code works fine in but i want to calculate 'YTD Scrap' / 'YTD Issues'

SELECT stockm.warehouse, stockm.product, stockm.long_description, stockm.analysis_a, stockm.analysis_b, (stockm.year_to_date02-stockm.year_to_date09) AS 'YTD Issues', stockm.year_to_date06 AS 'YTD Scrap'
FROM live.scheme.stockm stockm
WHERE (stockm.year_to_date06>0) AND (stockm.year_to_date02>0)
ORDER BY stockm.product


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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