USE [ArizonaRep]

PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - starting address. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';
ALTER TABLE dbo.address
REBUILD WITH(
	FILLFACTOR = 70
)
PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - done address . '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';

PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - starting Address_key. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';
ALTER TABLE dbo.Address_key
REBUILD WITH(
	FILLFACTOR = 70
)
PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - done Address_key. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';

PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - starting Address_OU_link. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';
ALTER TABLE dbo.Address_OU_link
REBUILD WITH(
	FILLFACTOR = 70
)
PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - done Address_OU_link. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';

PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - starting telecom. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';
ALTER TABLE dbo.telecom
REBUILD WITH(
	FILLFACTOR = 70
)
PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - done telecom. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';

