I need to update all varchar to nvarchar, text to ntext and char to nchar in some 300 .sql files stored on my disk. These files include stored procedures, triggers, functions, views etc. What is the best approach to achieve this.
If you really want the safe way, you'd need to use a parser which actually understands the structure and only replaces these occurenses which do match.
I'm not sure if the effort to dive into it is worth it, but you could code something yourself. You could try and see if an opensource T-SQL parser can handle your files; one is part of the opensource bsn ModuleStore versioning toolset.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With