anyone know offhand if there is a TSQL function si...
# sql
w
anyone know offhand if there is a TSQL function similar to COALESCE but instead of it returning the first non-null value it returns the largest value in the series?
r
What version of SQL Server? 2016+
Copy code
SELECT MAX(value) AS maxValue
FROM STRING_SPLIT('10,13,15,8,2', ',')
w
2019 but a db in 2008 r2 compat. will give it a try, thanks
r
Yeah, it will need to be in 2016+ compat mode.
✔️ 1
p
RIP for having to deal with 2008 compat
w
it's like having a brand new car that runs on leaded gas
💯 2