View Single Post
  #4  
Old 04-23-2008, 07:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
$1 or \1. Your sample worked in my tests after modifying as above and checking the Replace in File step (to include in the build).

4/23/2008 6:56:34 AM: --------------------Starting Build: 'removebrackets.bld'--------------------
4/23/2008 6:56:34 AM: Building project step 'Project steps'...
4/23/2008 6:56:34 AM: Building project step 'Create test file'...
Creating file C:\Temp\test.sql
4/23/2008 6:56:34 AM: Building project step 'Show test file'...
--ApplyTo:[Upgrade]
bla bla
--ApplyTo:[BusinessData]
IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('[og].[ClearVisionExport]') AND name = 'UserComment')
ALTER TABLE [og].[ClearVisionExport]
ADD [UserComment] [VARCHAR] (4000) NULL
--ApplyTo:[None]
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
4/23/2008 6:56:34 AM: Building project step 'Remove ApplyTo brackets'...
3 match(es) found, 3 replacement(s) made in file
4/23/2008 6:56:34 AM: Building project step 'Show test file after changes'...
--ApplyTo:Upgrade
bla bla
--ApplyTo:BusinessData
IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('[og].[ClearVisionExport]') AND name = 'UserComment')
ALTER TABLE [og].[ClearVisionExport]
ADD [UserComment] [VARCHAR] (4000) NULL
--ApplyTo:None
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
Reply With Quote