hoffmanconsultingllc
asked on
Correct TSQL Syntax for sp_spaceused
Hello,
I am trying to write a 2008 R2 query that will only bring back the data portion related to how much space a particular table is using in an SQL DB. Below you see the string i use and the returned data. I only need the data column and cannot figure out how to format the query, ideally it would return the result in GB or MB.
I am trying to write a 2008 R2 query that will only bring back the data portion related to how much space a particular table is using in an SQL DB. Below you see the string i use and the returned data. I only need the data column and cannot figure out how to format the query, ideally it would return the result in GB or MB.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
You can't execute a procedure from a function, especially a system one. You can put Cyber-spy's code in a stored procedure to create that table. You execute the procedure followed by the select * from
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks much these will work great!!!