Sample Header Ad - 728x90

SQLCMD is not working in pre-deployment script in sql project

0 votes
1 answer
1564 views
I have sql project in visual studio and I created pre-deployment script /* Pre-Deployment Script Template -------------------------------------------------------------------------------------- This file contains SQL statements that will be executed before the build script. Use SQLCMD syntax to include a file in the pre-deployment script. Example: :r .\myfile.sql Use SQLCMD syntax to reference a variable in the pre-deployment script. Example: :setvar TableName MyTable SELECT * FROM [$(TableName)] -------------------------------------------------------------------------------------- */ :setvar TableName MyTable SELECT * FROM [$(TableName)] but Iam getting an error at :setvar line Incorrect syntax near ':'. what am I missing ?
Asked by Muflix (1099 rep)
Jul 19, 2016, 11:32 AM
Last activity: Mar 30, 2018, 02:36 PM