I have a warning in my Execution plan that I can not get rid of. I've made an Minimal, Reproducible Example here:
declare @TestData Table
(
FloatValue float null
)
insert into @TestData values
(null), (0.1)
select
CONVERT(varchar, FloatValue * 100.00) + ' pct.' PctValue
from
@TestData
I've included the warning.

SQL Server is sometimes a little over cautious with its warnings.
You can encounter various warnings in the execution plan that, after review, prove to be irrelevant; for example you may sometimes see a warning about an excessive memory grant, even though the grant is literally the minimum configured amount possible per query.
As this is not a column involved with filtering or joining decision making you can safely disregard it.
You can change CONVERT(varchar, FloatValue * 100.00) to FORMAT(FloatValue * 100.00, 'N0') in the query:
declare @TestData Table
(
FloatValue float null
)
insert into @TestData values
(null), (0.1)
select
FORMAT(FloatValue * 100.00, 'N0') + ' pct.' PctValue
from
@TestData
And it will get rid of the warning:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With