| Subject: MSBuild |
| Group: microsoft.public.windows.developer.winfx.sdk |
| Date: 3/7/2007 4:20:45 AM |
| From: "Claws" [Email Address Protection] |
Hi everyone. I am starting out with MSBuild as "makefile". In my project, I have a bunch of script files (containing SQL statements) that I would like to be executed only if they are modified. How do I accomplish that? Thanks! Claus |
| Back |
| Subject: Re: MSBuild |
| Group: microsoft.public.windows.developer.winfx.sdk |
| Date: 3/20/2007 3:01:18 AM |
| From: "Bryan Phillips" [Email Address Protection] |
Usually, I put a T-SQL IF statement in my SQL to see if the script needs to run. Ex: IF NOT OBJECT_ID('MyTable') IS NULL BEGIN CREATE TABLE MyTable (a int) END IF NOT EXISTS(SELECT * FROM syscolumns WHERE name ='MyColumn' and id = OBJECT_ID('MyTable')) BEGIN ALTER TABLE MyTable ADD MyColumn VARCHAR(200) END -- Bryan Phillips MCSD, MCDBA, MCSE Blog: http://bphillips76.spaces.live.com "Claws" <mrbehn@gmail.com> wrote in message news:1173266445.173813.186360@n33g2000cwc.googlegroups.com: > Hi everyone. > > I am starting out with MSBuild as "makefile". In my project, I have a > bunch of script files (containing SQL statements) that I would like to > be executed only if they are modified. How do I accomplish that? > > Thanks! > > Claus |
| Back |