VSTS Build fails: 'trim' is not a recognized built-in function name
MarkPhsa
Posts: 3 New member
I am using a UDF newly available with SQL 2017 called dbo.TRIM. From Visual Studio 2017 I can build the project without issue and deploy the individual stored procedures that I use it in.
Please note that I have tried this with the project "Target Platform" set to both of these values:
Please note that I have tried this with the project "Target Platform" set to both of these values:
- SQL Server 2017
- Microsoft Azure SQL Database V12
<div>2018-09-18T20:01:32.1343049Z Validating project 'D:\a\1\s\db-fhir-store-redgate\db-fhir-store-redgate\db-fhir-store-redgate.sqlproj'.</div><div>2018-09-18T20:01:55.4958454Z ##[warning] DbBuildTask: ERROR D:\a\1\s\db-fhir-store-redgate\db-fhir-store-redgate\Programmable Objects\fhir\Stored Procedures\PatientMutation.sql(0,0): An error occurred while attempting to verify project scripts: </div><div>2018-09-18T20:01:55.4969737Z ##[warning] Msg 195, Level 15, State 10, Server factoryvm-az69\LOCALDB#EAD7A53C, Procedure PatientMutation, Line 30</div><div>2018-09-18T20:01:55.4971175Z ##[warning] 'trim' is not a recognized built-in function name.</div><div>2018-09-18T20:01:55.4972364Z ##[warning] Msg 195, Level 15, State 10, Server factoryvm-az69\LOCALDB#EAD7A53C, Procedure PatientMutation, Line 35</div><div>2018-09-18T20:01:55.4973515Z ##[warning] 'trim' is not a recognized built-in function name.</div><div>2018-09-18T20:01:55.4975190Z ##[warning] Msg 319, Level 15, State 1, Server factoryvm-az69\LOCALDB#EAD7A53C, Procedure PatientMutation, Line 35</div><div>2018-09-18T20:01:55.4976771Z ##[warning] Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.</div><div>2018-09-18T20:01:55.4978431Z ##[warning] Msg 319, Level 15, State 1, Server factoryvm-az69\LOCALDB#EAD7A53C, Procedure PatientMutation, Line 38</div><div>2018-09-18T20:01:55.4979983Z ##[warning] Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.</div><div>2018-09-18T20:01:55.8970810Z ##[error]RedGate.Versioning.Automation.Shared.Errors.TerminatingException: Schema validation failed: </div><div>2018-09-18T20:01:55.8974835Z at RedGate.Versioning.Automation.MsBuild.MsBuildTaskRunner.PerformBuild(String projectPath, IDictionary`2 globalProperties)</div><div>2018-09-18T20:01:55.8976212Z at RedGate.Versioning.Automation.Compare.Projects.ScaProjectBuilder.Build(ScaProjectPath scaProject, IDatabase database)</div><div>2018-09-18T20:01:55.8977064Z at RedGate.Versioning.Automation.Compare.SchemaValidation.DiskBackedProjectValidator.ValidateProject(IProjectPath projectPath, IDatabase database, CreateDatabaseParameters createDatabaseParameters)</div><div>2018-09-18T20:01:55.8977967Z at RedGate.Versioning.Automation.Compare.SchemaValidation.ProjectValidator.ValidateProject(String projectPath, CreateDatabaseParameters createDatabaseParameters)</div><div>2018-09-18T20:01:55.8978644Z at RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuildCommandImpl.Process()</div><div>2018-09-18T20:01:55.8979226Z at RedGate.Versioning.Automation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord()</div><div>2018-09-18T20:01:55.8981595Z at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)</div>
Tagged:
Answers
- SQL Server 2017
- Microsoft Azure SQL Database V12
The actual target is an Azure SQL database.Is there somewhere else that I specify the target? I did not see it on the VSTS build task
http://listofsoftwareontfshostedbuildserver.azurewebsites.net/