----------------------------------------------------------------------------------------------------
print '=== FLAT OWNER CABINET (TABLE LIST): ==='
print ''
GO
----------------------------------------------------------------------------------------------------
:SetVar ExpectedTableCount "10"
select CONVERT($(dt_Name_AUX),[name]) 'Tables'
from [sysobjects] (nolock)
where [type]='U' and [name] in
(
   N'Люди',                -- flat related persons
   N'Лицевые счета',       -- flat owner accounts
   N'Квартиры',            -- flats
   N'Дома',                -- buildings
   N'Жил.организации',     -- technical subdivisions
   N'Улицы',               -- streets
   N'Районы',              -- districts

   N'Финансовые периоды',  -- financial periods
   N'Услуги потребления',  -- flat services

   N'Персональный доступ'  -- personal access
)
order by [name]
if @@ROWCOUNT <> $(ExpectedTableCount)
   raiserror ('Table count is not equal to $(ExpectedTableCount) (expected number).',11,1)
GO
----------------------------------------------------------------------------------------------------
