by Valmik
4. November 2011 08:43
Most often when we deal with the multiple .sql files to be included in post-deployment script in a MS database project, We may encounter this problem and hence the project build gets broken. The error text reads something like:
Error 628 TSD01261: The syntax check failed 'Incorrect syntax near USE.' in the batch near 'USE [StagingData]
' . 0 0 StagingData
After some googling and some thinking(:)), I found the root cause. It errors out because it expects some separator between two files that are specified in post deployment script list specified with :r .\blah.sql
So each of the script file needs to end with the statement GO and it works perfectly fine.
c0471119-4d9a-4ea8-aad8-a331729fc3e1|1|5.0
Tags: