February 28, 2024 at 8:19 pm
I think that I am almost there but I am getting one red squiggle under the
((100.00
on Line 5
SELECT SalesLT.Product.Name
,SalesLT.Product.Color
,SalesLT.Product.StandardCost
,SalesLT.Product.ListPrice
,(CONCAT('£'CAST ((100.00,'C', 'en-gb'))AS CurrencyFormat)'SalesLT.Product.ListPrice - SalesLT.Product.StandardCost AS Profit')
,SalesLT.ProductModel.Name AS SubCatNameType
,SalesLT.Product.ListPrice,SalesLT.Product.Name AS SubCatName
FROM SalesLT.Product INNER JOIN
SalesLT.ProductModel ON SalesLT.ProductModel.ProductModelID = SalesLT.ProductModel.ProductModelID
Many thanks
February 28, 2024 at 8:30 pm
(CONCAT('£'CAST ((100.00,'C', 'en-gb'))AS CurrencyFormat)'SalesLT.Product.ListPrice - SalesLT.Product.StandardCost AS Profit')
Is this supposed to be one column or two? What are you trying to do here? It's not clear.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
February 28, 2024 at 9:06 pm
It should be on column.
February 28, 2024 at 9:26 pm
OK, here is my second question, once again, this time in black and white.
What should the column should be called and what calculation is required?
The existing syntax is nonsensical.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
February 28, 2024 at 9:31 pm
The column should be called profit.
Thanks
February 28, 2024 at 9:42 pm
OK. Try this
(SalesLT.Product.ListPrice - SalesLT.Product.StandardCost) AS Profit
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply