


alter table _tablas add eliminarIntermedias int not null default 0

GO

--creo que genBodega no deberia eliminarse...
update _tablas set eliminarIntermedias = 1
where (tabla like 'seg_%' or tabla like 'gui_%' or tabla like 'gen%') and  (not (CHARINDEX ('_', tabla, 5)>0))
