Just a quick post to show, how to loop through all tables and columns in database and find all occurrences of the keyword specified – /*Declare variables */ Declare @Keyword varchar(200) Declare @CountTable int Declare @Loop int Declare @DbOwner varchar(50) Set @Loop = 1 /*keyword to search for */ Set @Keyword = report /*Owner of [...]
Yesterday, I was working on an application where we have to store unicode characters in existing database. So our requirement was to switch all varchar column within the database to Nvarchar. There were around 22 tables and manually changing each one would be tedious task. So here is what we did – DECLARE @T VARCHAR(255) [...]