views:

96

answers:

1

Is it possible to configure Visual Studio 2008 to automatically remove lines in a sql file like this:

prompt PL/SQL Developer import file
prompt Created on jueves, 30 de julio de 2009 by pepe
set feedback off
set define off
prompt Disabling triggers for MYTABLE...
alter table MYTABLE disable all triggers;
  1. Remove lines that starts with prompt .
  2. Replace ; by \r\n and char /.

Are there any extensions or macros available to do this?

+1  A: 

I wouldn't bother with a macro for that - I'd just use search and replace with regular expressions. Admittedly Visual Studio's regular expressions are somewhat non-standard, but they should be able to cope with this.

Jon Skeet
I prefer Macro for share it with all developers in my company. I think is better have common functionality, isn't?
Alhambra Eidos
Personally if I wanted to do this multiple times I'd probably just write a tool that could be executed against a file to rewrite it, but I'm a tools guy rather than a macro guy :)
Jon Skeet