I have a select statement to display some calculations and this is what I have down:
SELECT Title, ((Retail-Cost)/Cost)*100 AS “Profit %” FROM Table1;
Everything looks OK except the numbers in the new Profit % column; there are way to many decimal points so I need some help on adding the data type NUM(2,0) to the statement. Can I add it to the above select statement and if yes how (please write the complete statement)? One thing that I thought about was using conditions...please see below. This is not in a right format and will not run. Please let me know if I am on the right path and the correct format.
SELECT Title, ((Retail-Cost)/Cost)*100 AS “Profit %” WHERE Profit % NUM(5,0) FROM Table1;