Hi
I have the following code
Select (sum(TotalSellPrice) - sum(TotalCostPrice)) / sum(TotalsellPrice)* 100 as Margin
from OrderHeader where DateTimeCreated >= DATEADD(day, datediff(day,0,getdate()),0) AND DateTimeCreated <= DATEADD(day, datediff(day,0,getdate()),0) + 1
AND OrderType = 1
AND Deleted = 0
I want to add the % sign to the result AS Margin.
I have tried CAST and + '%' in several places but cant seem to get it working.
Any ideas please
Thanks
I have the following code
Select (sum(TotalSellPrice) - sum(TotalCostPrice)) / sum(TotalsellPrice)* 100 as Margin
from OrderHeader where DateTimeCreated >= DATEADD(day, datediff(day,0,getdate()),0) AND DateTimeCreated <= DATEADD(day, datediff(day,0,getdate()),0) + 1
AND OrderType = 1
AND Deleted = 0
I want to add the % sign to the result AS Margin.
I have tried CAST and + '%' in several places but cant seem to get it working.
Any ideas please
Thanks