Transact-SQL Cast or Convert
Go to solution
Solved by adman29,
Okay, I figured it out, sorry for the quick turnaround, but if anyone needs the info for future reference:
Select P.ProductModelID, P.Name, CAST(((P.ListPrice - P.StandardCost)/P.StandardCost) AS DECIMAL(18,2)) AS ProfitMargin From Production.Product P Left JOIN Production.ProductSubcategory PS ON P.ProductSubcategoryID = PS.ProductSubcategoryID Right Join Production.ProductCategory PC ON PC.ProductCategoryID = PS.ProductCategoryID Where PC.ProductCategoryID = 1 ORDER BY ProfitMargin DESC
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now