A client reported that they were running on SQL Server 2012, and we delivered some test queries for testing prior to a final delivery, however:
'CONCAT' is not a recognized built-in function name.
I understand that CONCAT()
is a new built-in function introduced in SQL Server 2012, which is all fine and well, however I have been asked to roll back my change to make this 2008R2 compatible under the guise of "the user executing the query may not have Transact-SQL permissions to execute." So I am just proving my point that the client most likely has a different version of SQL Server installed in DEV than they do in PROD.
I can't find any information about specifically denying SELECT/EXECUTE
permissions for built-in scalar valued functions, but is it possible, and if so does the user still receive the same error text?
SELECT (c.FirstName+','+c.LastName) AS FULLNAME FROM graduatejob c;
DECLARE @msg VARCHAR(200) = 'Shrink file completed. Target Size: ' + @TargetSize + ' MB. Timestamp: ' + CURRENT_TIMESTAMP;