Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Insert into TblSource (oldTableName) Select Name From sys.tables Where type_desc ='USER_TABLE' AND (Name like 'emp%') Declare @ID int , @srcTblName nvarchar(50) , @country varchar(3) , @desTblName varchar(50) , @loopCntr int Set @loopCntr = @@ROWCOUNT While @loopCntr <> 0 Begin Set @ID = ( Select ID From TblSource Where ID = @loopCntr ) Set @srcTblName = ( Select oldTableName From TblSource Where ID = @ID) Set @Country = ( Select Country From tblCountry Where C_Abr = ( CASE substring(@srcTblName,6,2) WHEN 'U' THEN 'US' WHEN 'U' THEN 'UK' END)) Set @desTblName = RIGHT(@srcTblName,LEN(@srcTblName) --don't pay much attention to this formula, imagin it works fine and return correct name. Update TblSource Set Country = @Country , desTblName = @desTblName Where ID = @ID Set @ID = (Select ID From TblSource Where oldTblName = 'employee') set @srcTblName =(Select oldTblName From TblSource Where ID = @ID ) If (@ID <> '') Begin Insert Into @desTblName ( location_ID, [country], [Active]) Select Distinct (s.location) ,@Country 1 From (Select oldTblName From TblSource Where ID = @ID) AS s --@srcTblName -- End End set @loopcntr = @loopcntr -1 END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.