Competition: What’s your favorite Redgate tool? Enter now.

Join Fromat wrong

edited October 6, 2016 8:21AM in SQL Prompt
Hi!

Version 7.3.0.587
BTW It would be helpful to allow to copy the version number from the about SQL Prompt window!

--one in_row_data allocation unit and one additional row_overflow_page
SELECT
OBJECT_NAME(object_id) AS name
, partition_id
, partition_number
, rows
, allocation_unit_id
, type_desc AS page_type_desc
, total_pages AS pages
, used_pages
, data_pages
FROM sys.partitions p
JOIN
sys.allocation_units a
ON
p.partition_id = a.container_id
WHERE object_id = OBJECT_ID('dbo.BigTable');
GO

leads to

--one in_row_data allocation unit and one additional row_overflow_page
SELECT
OBJECT_NAME(object_id) AS name
, partition_id
, partition_number
, rows
, allocation_unit_id
, type_desc AS page_type_desc
, total_pages AS pages
, used_pages
, data_pages
FROM
sys.partitions p
JOIN
sys.allocation_units a
ON
--tab between p and the column name
p .partition_id = a.container_id
WHERE object_id = OBJECT_ID('dbo.BigTable');
GO

Comments

Sign In or Register to comment.