MSSql Find and Replace only datatypes

Topics: Developer Forum, User Forum
Nov 26, 2010 at 3:29 PM

Hi,

I am looking for an approach to find and replace datatypes in all my sql files. Say I have got some 1000 files in a folder in local system. These files include stored procedures, triggers, functions. Views etc. I want to find and replace all the varchar datatype with nvarchar, text with ntext etc. This can be done using simple find and replace, but in my files some column names are Text so the find replace will update the column names as well which is undesirable. The approach which I am thinking of is parsing all the files and find and replace only the datatypes and not the column names, which I think will be possible the files are parsed. Is there any way to achieve this using Scintilla.Net?

Any help would be much appreciated..

Thanks.

Ssasidha