THE SQL Server Blog Spot on the Web
Another item that I've seen used a lot which is now deprecated is the :: function calling sequence.
If you have code like:
SELECT * FROM ::fn_virtualfilestats(2,1);
You should now instead be coding it as:
SELECT * FROM sys.fn_virtualfilestats(2,1);
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
well it sort of makes more sense .. I guess I'd already encountered this but as I can never remember how to call functions in a select I tend to go through the various options until it works!
This makes sense to me if it is a truly a table-value function (like sys.dm_db_index_physical_stats), but if it is a scalar function that replaces a server "function" like @@servername, I see no sense in this. To me this muddles the concept of the original @@servername scalar system functions with the system functions like the dm views (which are sometimes table-valued functions).