0

We are a team working on a project, and one of our teammates created the database and included the script to create the tables , I am using sql server and I set the properties to my local database but when I hit deploy the PREDEPLOYMENT.SQL I get a bunch of syntax error,

The syntax check failed 'Incorrect syntax near `.' in the batch near:
Error   383 SQL80001: An expression of non-boolean type specified in a context where a condition is expected.   ...\Pre-Deployment\Script.PreDeployment.sql 228

Don't understand why I am getting all these syntax errors

Didier Ghys
  • 30,396
  • 9
  • 75
  • 81

1 Answers1

0

From the question referenced in my comment above, I believe the SQL Server syntax you are looking for is:

IF (EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'TheSchema' AND  TABLE_NAME = 'TheTable'))
BEGIN
    --Do Stuff
END
M.Babcock
  • 18,753
  • 6
  • 54
  • 84