Good Morning All,
Test Table
Booking Ref No: Booking Ref No 1
L01 1
L01 0
L01 0
L02 1
L03 1
L04 1
L05 1
L04 0
Can anyone kindly assit me on this. I have column on one of my tables with...
Hello All
Can you kindly advice what is wrong with this statement
COALESCE (SUM(Cost)) AS Cost,
I am getting this error
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near ')'.
Hello All, can you please help. I am trying to display margin as 0.00 if [GrossProfit] = 0 if not then do the calculation. thanks in advance
SELECT *, CASE WHERE [GrossProfit] <> 0 THEN (CONVERT(DECIMAL(17,2),([GrossProfit] / NULLIF(Price,0) * 100.0))) AS Margin
ELSE...
Hi, Question in the code you have written X at the end. What is the purpose of that and one more question some of the results are showing value as null how can i display 0.00 ?
Thanks in advance
Hello Markos, thanks for your reply but i am getting this erros
Msg 207, Level 16, State 1, Line 1
Invalid column name 'Gross Profit'.
Gross Profit is not the column from the table but it's a calculated one.
Appreciate your time
Regards
WEXAS
Hi, hope every one is doing well. I am new to sql queries.
I need to calculate 'MARGIN', which is 'GrossProfit'/[price]*100 and then display the reuslt in the query. Can someone please help me !
SELECT
[Booking Product],
YEAR([Booking Conf Date]) AS 'BookingYear',
COUNT(DISTINCT...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.