Hello @Lon Fortes ,
Thanks for the ask and using the Microsoft Q&A platform .
This below piece the code should to the trick with the SELECT
declare @tableobjectid int = object_id('[dbo].[DimReseller]'),
@rangeValue varchar(50) ='100'
declare @sql nvarchar(max)
select @sql = 'ALTER TABLE [s.name ] SPLIT Range (''' + @rangeValue +''')
from sys.tables t
join sys.schemas s on t.[schema_id] = s.[schema_id]
where t.[object_id] =' + convert(varchar,@tableobjectid)
print @sql
Output
ALTER TABLE [s.name ] SPLIT Range ('100')
from sys.tables t
join sys.schemas s on t.[schema_id] = s.[schema_id]
where t.[object_id] =2098106515
Thanks
Himanshu
Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members