If you’re getting SQL Server error number 189 that reads “The greatest function requires 1 to 254 arguments“, it’s probably because you’re either passing too few or too many arguments.
As the error message alludes to, you need to pass at least 1 argument, and no more than 254 arguments when using the GREATEST()
function.
To fix this issue, be sure to pass at least 1 argument, and no more than 254 arguments.
Continue reading